Skip to content

mat-nav-bar missing example for method updateActiveLinks #14032

Open
@pcnate

Description

@pcnate

https://github.com/angular/material2/blob/a6c6a58cc4bccddeb87ad71b33a849527e23c462/src/lib/tabs/tab-nav-bar/tab-nav-bar.ts#L118-L123

The docs do not provide any explanation of how to access this method. Tried checking other methods that I have used but nothing works.

<nav mat-tab-nav-bar #tabs>
  <a mat-tab-link *ngFor="let link of links"
    (click)="activelink = link.identifier"
    [active]="activelink === link.identifier"
    [routerLink]="[ './', link.identifier ]"
  >{{ link.title }}</a>
</nav>

Is this this correct?
@ViewChild( 'tabs' ) tabs: MatTabNav;
Even tried this:
@ViewChild( 'MatTabNav' ) tabs: MatTabNav;

I feel like I am missing something important
this.whatshouldthisbe.updateActiveLink( '#tabs' )

As a side note, many other times I feel the source code makes far more sense than the docs do. Do I need to fully understand the source in order to make sense of the docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: docsRelated to the documentationarea: material/tabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions