Configure Your First Angular Route

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

Using the Angular router requires defining routes, passing them in to the RouterModule.forRoot and then importing the configured RouterModule into your main App Module.

Brendan Whiting
~ 7 years ago

I downloaded the project, ran 'npm install' and got these errors:

npm WARN angular2-in-memory-web-api@0.0.21 requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN angular2-in-memory-web-api@0.0.21 requires a peer of @angular/http@^2.0.0 but none was installed.
npm WARN angular2-in-memory-web-api@0.0.21 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN angular2-in-memory-web-api@0.0.21 requires a peer of zone.js@^0.6.25 but none was installed.

The package.json file has newer versions specified. Do I need to force it to use older versions?

satnam
~ 6 years ago

The plunker preview doesn't work. [console-feed] Failed to parse message! log.data was not an array! TypeScript transpiling to CommonJS, consider setting module: "system" in typescriptOptions to transpile directly to System.register format Error {originalErr: Error, constructor: Object} Assertion failed: loading or loaded