Skip to content

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

@AnasSahel

Description

@AnasSahel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions