Oct 11, 2023
0
Level 4
Can't bind to 'routerLink' since it isn't a known property of 'a'.ngtsc(-998002)
I have routerLink on My Angular App with Laravel API.
<a routerLink="employee/{{emp.id}}"><td> {{emp.first_name}}</td></a>
I have import routerLink as well in app.module.ts
import { RouterModule, Routes } from '@angular/router';
imports: [
BrowserModule,
HttpClientModule,
RouterModule.forRoot(appRouters),
AppRoutingModule
],
but I got following error message with the link
Can't bind to 'routerLink' since it isn't a known property of 'a'.ngtsc(-998002) employees.component.ts(8, 20): Error occurs in the template of component EmployeesComponent.
how to fix this?
Please or to participate in this conversation.