Failed: Template parse errors:
Can't bind to 'routerLink' since it isn't a known property of 'a'. ("nd">
<img width="25" src="../assets/images/app_logo.jpg">
<a class="navbar-brand" [ERROR ->][routerLink]="['/avior/dashboard']"> === Application ===</a>
</a>
"): ng:///DynamicTestModule/AppComponent.html@7:27
...
The same error goes over and over again for every a anchor with [routerLink] inside of it...
I tried importing RouterModule into app.component.ts AND app.module.ts, but it does not seem to help. I also imported it into every .ts file where the routerLink is used but that didn't help either.
I tried importing import { RouterTestingModule } from '@angular/router/testing'; in the spec.ts and that didn't help either but I think it's somewhere in the right way.
P.S I haven't changed the .spec.ts files with one exception.
from Lots of Failed: Template parse errors: Can't bind to 'routerLink' since it isn't a known property of 'a'. errors in Karma
No comments:
Post a Comment