Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 912 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 912 Bytes

@schaman/angular-breadcrumb

This module provides custom breadcrumb functionality. To use the module do 3 easy steps.

Provide the module for root.

SchamanBreadcrumbModule.forRoot();

Inject the order service on component level in your page. This will control the order of the breadcrumbs. Also use the *schamanBreadcrumb structural directive.

@Component({
  template: `<a *schamanBreadcrumb routerLink="Homepage">Homepage</a>`,
  selector: 'test-1',
  providers: [BreadcrumbOrderService],
})
class RouterPageComponent {}

Use the breadcrumb anywhere.

@Component({
  template: `
    <schaman-breadcrumb [separator]="sep"></schaman-breadcrumb>
    <ng-template #sep let-i="index">&gt;</ng-template>
    <router-outlet></router-outlet>
  `,
})
class LayoutComponent {}

Running unit tests

Run nx test angular-breadcrumb to execute the unit tests.