I work on angular 11 I face error when build angular app

ERROR in src/app/Employee-list/employee-list.component.html:22:45 - error 
NG8002: Can't bind to 
'routerLink' since it isn't a known property of 'a'.
<a class="nav-link text-dark">Staff List</a>

and below is package json file


"@angular/animations": "^11.2.14",
    "@angular/cdk": "^12.1.3",
    "@angular/common": "^11.0.0",
    "@angular/compiler": "^11.0.0",
    "@angular/core": "^11.0.0",
    "@angular/forms": "^11.0.0",
    "@angular/material": "^11.2.13",
    "@angular/router": "^11.2.14",
    "@angular/cli": "^11.0.0",
    "@angular/compiler-cli": "^11.0.0"


so How to solve issue ?

sample of app modules and component employee list exist as blow

https://stackblitz.com/edit/angular-uffug5?file=src%2Fapp%2FEmployee-list%2Femployee-list.component.ts

What I have tried:


on app.module.ts application module I do as below :

import { RouterModule } from '@angular/router';


@NgModule({
 
  imports: [
    RouterModule

sample of app modules and component employee list exist as blow
https://stackblitz.com/edit/angular-uffug5?file=src%2Fapp%2FEmployee-list%2Femployee-list.component.ts


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/ad6af0f1-5b71-42c3-8748-e2d48b6062b8n%40googlegroups.com.

Reply via email to