我刚刚将路由系统添加到我的第一个angular2应用程序中:
@RouteConfig([
{
path: "/home",
name: "Homepage",
component: HomepageComponent,
useAsDefault: true
},
{
path: "/clients/details/:id",
name: "ClientsDetails",
component: ClientsDetailsComponent
}
])
虽然它适用于大多数浏览器,但它似乎无法在IE9上运行。 当我登陆第一页(/ home)时出现以下错误:
"EXCEPTION: Error: Uncaught (in promise): TypeError: Object doesn't support property or method 'pushState'
在我的index.html中,我有:
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
知道我错过了什么吗?