DEV Community

Alverson Layne
Alverson Layne

Posted on

Answer: How to implement routed tabs with angular material, within a child route?

If my understanding is right, you want to navigate to a component in a lazy loaded module.

For this I made a stackblitz, which might be useful for you.

Here's the basic code for your understanding

<nav mat-tab-nav-bar class="mat-elevation-z8" >
  <a
    mat-tab-link
    *ngFor="let link of navLinks"
    routerLink="{{ link.location }}"
    routerLinkActive

Top comments (0)