Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ng8-breadcrumb with all npm packages installed. Try it out:

require("@angular/common/package.json"); // @angular/common is a peer dependency. require("@angular/core/package.json"); // @angular/core is a peer dependency. var ng8Breadcrumb = require("ng8-breadcrumb")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ng8-breadcrumb v1.0.5

ng8-breadcrumb is an Angular 8 module generating breadcrumbs based on the routing state.

ng8-breadcrumb

NPM
Downloads Version

Installation

ng8-breadcrumb is available on NPM

$ npm install ng8-breadcrumb --save

Setup & Usage

Once the module has been installed, you need to include Ng8BreadcrumbModule into your root module:

import {Ng8BreadcrumbModule} from 'ng8-breadcrumb';
...
@NgModule({
  imports: [
    ...
    Ng8BreadcrumbModule.forRoot({
        prefix: 'Home' // default 'false'
    }),
    ...
  ],
  ...
})
export class AppModule {}

& Anywhere template component :

<ng8-breadcrumb></ng8-breadcrumb>

Use in the service :

 constructor(private _breadcrumb: BreadcrumbService) {
    _breadcrumb.store('id', 'iPhone x');
  }

And finally route configuration:

{
        path: '...',
        ...
        data: { breadcrumb: 'YOUR TEXT' },
        ...
}

License

ng8-breadcrumb is released under MIT license.

Author

Allahyar

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free