6

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.

4 Answers 4

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

For future reference: The repository was merged into github.com/angular/angular - but all the issues (some with useful information and instructions) are now gone.
2

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.

1 Comment

I've done exactly this, like the quickstart suggests. When loading the app in the browser, I'm getting 404s on several .umd.js files (which didn't happen in rc1) causing the app to not load at all.
0

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"

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.