Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Angular 2 RC2 w/ new component router

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:

enter image description here

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.

like image 441
Steve Avatar asked Jun 20 '16 14:06

Steve


1 Answers

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

like image 171
Mwaa Joseph Avatar answered Oct 23 '22 04:10

Mwaa Joseph