安装带有新组件路由器的 Angular 2 RC2 [英] Installing Angular 2 RC2 w/ new component router
问题描述
我可能遗漏了一些简单的东西,但是尝试使用新的组件路由器时我无法让 VS Code 识别它.
I'm probably missing something simple, but trying to use the new Component Router I can't get VS Code to recognize it.
我将 package.json
中的所有 @angular
引用更改为 2.0.0-rc.2
;运行 npm install 并且 VS Code 不喜欢我的导入:
I changed all my @angular
references in package.json
to 2.0.0-rc.2
; ran npm install and VS Code doesn't like my imports:
当我导航到 node_modules
中的 @angular/router
文件夹并检查 index.d.ts
时,我看到了所有引用对于 RC1 路由器.删除 @angular
文件夹并重新安装,结果相同.
When I navigate to the @angular/router
folder in node_modules
, and inspect the index.d.ts
I see all the references for the RC1 router. Removed the @angular
folder and installed again, same result.
推荐答案
针对 angular rc2 的新版本.要安装的路由器版本是
For the new release of angular rc2. The version of router to install is
"@angular/router" : "3.0.0-alpha.6" 或"@angular/router" : "3.0.0-alpha.7"
路由器的存储库位于 https://github.com/angular/vladivostok.网站上的文档 https://angular.io/docs/ts/latest/guide/router.html 在 alpha.6
上.我建议查看更改日志以了解使用 alpha.7
The repo for the router is at https://github.com/angular/vladivostok . The docs on the site https://angular.io/docs/ts/latest/guide/router.html are on alpha.6
. I would advice to go through the changelog to know about breaking changes when using alpha.7
这篇关于安装带有新组件路由器的 Angular 2 RC2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!