I'm probably missing something simple, but trying to use the new Component Router I can't get VS Code to recognize it.
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:
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.
For the new release of angular rc2. The version of router to install is
"@angular/router" : "3.0.0-alpha.6" or
"@angular/router" : "3.0.0-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
If you just started to work with Angular router, I suggest you disregard RC1 router and start with the new router v3.
"@angular/router": "3.0.0-alpha.7"
Here is the documentation for Router v3.
The router is not maintained as a separate project anymore. It has been recently merged into Angular2 and the router is now in beta.. I would suggest you to use start using the beta by adding a dependency in your package.json file
"@angular/router": "3.0.0-beta.2"
it is now at V3.RC1. So please update your package.json accordingly
"@angular/router": "3.0.0-rc.1",
You might also have to upgrade your application to Angular2.RC5 and change the way routing is done.