Can't bind to 'active' since it isn't a known property of 'a'
See original GitHub issueBug, feature request, or proposal:
I’m using the mat-tab-link
inside a mat-tab-nav-bar
and I’m getting the error:
Error: Template parse errors:
Can't bind to 'active' since it isn't a known property of 'a'. ("gFor="let link of navLinks" [routerLink]="['/'+link.path]" routerLinkActive #rla="routerLinkActive" [ERROR ->][active]="rla.isActive">
{{link.label}}
</a>
What is the expected behavior?
Not getting the error
What is the current behavior?
Getting the error
What are the steps to reproduce?
<nav mat-tab-nav-bar>
<a matTabLink *ngFor="let link of navLinks" [routerLink]="['/'+link.path]" routerLinkActive #rla="routerLinkActive" [active]="rla.isActive">
{{link.label}}
</a>
</nav>
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.2, Material 6.0.2, Safari and Chrome, Typescript 2.7.2.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Can't bind to 'active' since it isn't a known property of 'mat-tab'
As i see the problem here is using <mat-tab-group> , remove that part and it should work fine. <mat-tab *ngFor="let routeLink of routeLinks; ......
Read more >Common errors in Angular: Can't bind to since it isn't a known ...
Ever made an Angular application , opened your console and saw an error message similar to: “Can't bind to ngclass since it isn't...
Read more >Can't bind to 'routerLink' since it isn't a known property of 'a'
In this vide we will fix the angular 14 error Can't bind to 'routerLink' since it isn't a known property of 'a '....
Read more >Can you remember "Can't bind 'x' since it is not a known ...
This error often means that you haven't declared the directive "x" or haven't imported the NgModule to which "x" belongs.
Read more >Can't bind to 'routerLinkActiveOptions' since it isn't a known ...
Angular Application Error: Can't bind to 'routerLinkActiveOptions' since it isn't a known property of 'a', refer the solution given in this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you double-check that you’ve included the
MatTabsModule
in your app?Hmm, I’m having this same problem now, even with the
MatTabsModule
…