[英]Angular 6 application not loading in Microsoft edge browser and not throwing any errors
与Edgecloak集成的Angular 6应用程序未在Microsoft Edge版本41.162和Microsoft EdgeHTML 16.16299中加载。
在控制台中,仅引发警告消息:HTML1300:发生导航。 CSS3121:不建议使用媒体查询-ms-viewport。
我尝试了以下步骤:
1)我取消了对polyfills.ts中所有导入的注释,并运行了相应的npm install命令。
2)我在index.html中添加了以下行
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
3)我也按照帖子中的建议关闭了IE11中的“在Compatibility View中显示Intranet站点”。
4)验证是否在ts文件外部运行的任何订阅功能都在使用
.subscribe(function(data){}); 代替
.subscribe((data)=> {});
但是以下解决方案均无济于事。
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["es2015", "es2017", "dom"]
}
}
polyfills.ts
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
index.html
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
需要将授权重定向到应用程序后,要加载并重定向到keycloak进行登录的应用程序。 它可以在chrome和Mozilla Firefox浏览器中使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.