在Angular 4上开发应用程序。在IE工作的IE 9,10下工作。调试器中的错误是Object.isFrozen:参数不是对象。我的project.json
string authority = String.Format(CultureInfo.InvariantCulture,
ConfigurationManager.AppSettings["ida:AADInstance"],
ConfigurationManager.AppSettings["ida:Tenant"]);
AuthenticationContext authContext = new AuthenticationContext(authority, false);
ClientCredential clientCredential = new ClientCredential(ConfigurationManager.AppSettings["ida:ClientId"], ConfigurationManager.AppSettings["ida:AppKey"]);
AuthenticationResult result = null;
int retryCount = 0;
bool retry = false;
retry = false;
try
{
result = await authContext.AcquireTokenAsync(ConfigurationManager.AppSettings["ida:ResourceId"], clientCredential);
result = await authContext.AcquireTokenAsync(ConfigurationManager.AppSettings["ida:ResourceId"], clientCredential);
}
catch (AdalException ex)
{
}
finally
{
authContext = null;
}
我的polyfill.ts
"dependencies": {
"@angular/animations": "^4.4.0",
"@angular/common": "^4.4.0",
"@angular/compiler": "^4.4.0",
"@angular/core": "^4.4.0",
"@angular/forms": "^4.4.0",
"@angular/http": "^4.4.0",
"@angular/platform-browser": "^4.4.0",
"@angular/platform-browser-dynamic": "^4.4.0",
"@angular/router": "^4.4.0",
"blob-polyfill": "^1.0.20150320",
"classlist-polyfill": "^1.2.0",
"core-js": "^2.4.1",
"font-awesome": "^4.6.3",
"formdata-polyfill": "^2.0.4",
"intl": "^1.2.5",
"moment": "^2.19.1",
"primeng": "^4.2.2",
"reflect-metadata": "^0.1.3",
"rxjs": "^5.0.1",
"tedious": "^2.0.0",
"tslib": "^1.7.1",
"typedarray": "0.0.6",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.10"
},
我在做什么是错误的,或者在polyfills.ts中缺少什么?
答案 0 :(得分:1)
我建议您使用angular cli(即“ng new appname”)启动一个全新的项目并调整polyfills.ts文件。你需要取消注释行 '... core / es6 / ...'和classlist.js通过运行'npm install --save classlist.js'。
然后尝试一个简单的hello世界,看看它是否有效。
有关Angular浏览器要求的更多信息,请访问:https://angular.io/guide/browser-support#mandatory-polyfills