Vukota Savic
Vukota Savic

Reputation: 11

Breadcrumb Angular 12

I am working on my project and I want to add breadcrumb on top of every page and when I click on previous name of a page I want to redirect on that page. Version of Angular is 12.

I researched on the internet and I found something what I need actually.

I finished all steps and put in html file <xng-breadcrumb></xng-breadcrumb>

<div class="sdb-menu" id="sdb-menu">
  <ul class="menu grid-x" *ngIf="menu.length">
    <li [routerLinkActive]="['is-active']" class="text-center menu-item" *ngFor="let item of menu">
      <a class="gigaaa_sidebar_item" [routerLink]="item.link" [queryParams]="{ type: item.query }">
        {{item.title}}
      </a>
    </li>
  </ul>
  <ul class="menu submenu grid-x" *ngIf="submenu.length">
    <li [routerLinkActive]="['is-active']" class="text-center menu-item" *ngFor="let item of submenu">
      <a class="gigaaa_sidebar_item" [routerLink]="item.link">
        {{item.title}}
      </a>
    </li>
  </ul>
  <xng-breadcrumb></xng-breadcrumb>
</div>

The error is:

I really don't know what is the problem. Please help.

Upvotes: 0

Views: 813

Answers (1)

Raffael
Raffael

Reputation: 253

Did you import it correctly in your app.module.ts? As shown in the Quick start section (2nd point) of its npm page? https://www.npmjs.com/package/xng-breadcrumb

Upvotes: 0

Related Questions