Skip to content

nowzoo/ngx-crumbs

Repository files navigation

@nowzoo/ngx-crumbs

Breadcrumbs and window title for Angular apps.

Demo | Demo Source Code

Documentation

Quick start

npm i @nowzoo/ngx-crumbs --save

Import the module...

import { NgxCrumbsModule } from '@nowzoo/ngx-crumbs';
@NgModule({
  imports: [
    NgxCrumbsModule.forRoot()
  ],
})
export class AppModule { }

Add breadcrumbs to your route components using ng-template and the ngxCrumb directive. The content of the crumb can be dynamic...

<ng-template ngxCrumb>Dynamic: {{counter}}</ng-template>

To have the crumbs automatically update the window title, add the NgxCrumbsWindowTitleComponent to your app component...

<ngx-crumbs-window-title></ngx-crumbs-window-title>

To display Bootstrap breadcrumbs, use NgxCrumbsComponent...

<ngx-crumbs></ngx-crumbs>

Contributing

This project was generated with Angular CLI version 7.1.4.

git clone https://github.com/nowzoo/ngx-crumbs.git

The library code is in projects/ngx-crumbs.

The demo is in projects/ngx-crumbs-demo

Build the library: ng build ngx-crumbs

Serve the demo locally: ng serve ngx-crumbs-demo

Unit tests

Run ng test ngx-crumbs to execute the unit tests via Karma.

The library tests can also be run with Wallaby. Select the wallaby.js file in projects/ngx-crumbs.