最佳答案
我得到一个错误与下面的 TypeScript 代码:
///<reference path='../../../Shared/typescript/jquery.d.ts' />
///<reference path='../../../Shared/typescript/jqueryStatic.d.ts' />
function accessControls(action: Action) {
$('#logoutLink')
.click(function () {
var $link = $(this);
window.location = $link.attr('data-href');
});
}
我得到一个下划线的红色错误:
$link.attr('data-href');
这条信息说:
Cannot convert 'string' to 'Location': Type 'String' is missing property 'reload' from type 'Location'
Does anyone know what this means?