使Angular2兼容IE9
发布时间:2020-12-17 09:35:08 所属栏目:安全 来源:网络整理
导读:使用官网的quickstart是不兼容IE9的,我们需要另外配置使其兼容IE9。 参考 https://angular.cn/docs/ts/latest/guide/browser-support.html index.html中,除了引入shim.min.js还要引入 !-- Polyfill(s) for older browsers -- script src = "node_modules/c
使用官网的quickstart是不兼容IE9的,我们需要另外配置使其兼容IE9。 参考 https://angular.cn/docs/ts/latest/guide/browser-support.html index.html中,除了引入shim.min.js还要引入 <!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js"></script>
另外可能还要配置路由为HashLocationStrategy。 imports :[
RouterModule.forRoot(appRoutes,{
useHash:true})
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |