Try this:
Import RouterModule
into your app.module.ts
import { RouterModule } from '@angular/router';
Add RouterModule
into your imports []
like this:
imports: [ RouterModule, ]
More Related Contents:
- How do I create a singleton service in Angular 2?
- Angular 2 Scroll to top on Route Change
- Angular 2 unit testing components with routerLink
- Angular 2 – How do I navigate to another route using this.router.parent.navigate(‘/about’)?
- How do I detect user navigating back in Angular2?
- Angular2 – Interaction between components using a service
- Angular2 router keep query string
- Multiple canActivate guards all run when first fails
- Lazy Loading BrowserModule has already been loaded
- Pass parameter into route guard
- How do I share data between components in Angular 2?
- How to get query parameters from URL in Angular 5?
- Angular2: Make route paths case insensitive
- Angular2 canActivate() calling async function
- In Angular, What is ‘pathmatch: full’ and what effect does it have?
- Angular redirect to login page
- Angular4 Exception: Can’t bind to ‘ngClass’ since it isn’t a known property of ‘input’
- No provider for AngularFireDatabase, AngularFireAuth
- TS2531: Object is possibly ‘null’
- Custom ExceptionHandler change detection lag
- How do I navigate to a sibling route?
- Trigger update of component view from service – No Provider for ChangeDetectorRef
- TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable
- What is the meaning of question mark in expressions in Angular 2?
- Merging http observables using forkjoin
- TypeScript-‘s Angular Framework Error – “There is no directive with exportAs set to ngForm”
- How to return observable from subscribe
- Limit input field to two decimal places – Angular 5
- How to create and download text/Json File with dynamic content using angular 2+
- Angular4 Load external html page in a div