question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't bind to 'active' since it isn't a known property of 'a'

See original GitHub issue

Bug, 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:closed
  • Created 5 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
crisbetocommented, May 16, 2018

Can you double-check that you’ve included the MatTabsModule in your app?

7reactions
papirocommented, Aug 31, 2018

Hmm, I’m having this same problem now, even with the MatTabsModule

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found