答案 0 :(得分:1)
请确保更新您的package.json就像这样
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.1",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.26",
"zone.js": "^0.6.12" },
然后打开您的终端并输入npm install
。
是的,这很简单。希望它能帮到你:)
修改强>
新路由器现在是测试版。因此将3.0.0-alpha.8更改为3.0.0-beta.1
请在此处详细了解详情 - https://angular.io/docs/ts/latest/guide/router.html