Skip to content

Yamuna

Compare
Choose a tag to compare
@udayvunnam udayvunnam released this 20 Jul 14:39

Base route Breadcrumb
Added the ability to add breadcrumb for a base route such as 'Home'. closes #6

 { path: '', pathMatch: 'full',  data: { breadcrumb: 'Home' } },

Custom separator: closes #5
Breadcrumb by default uses '/' as the separator. To use custom separator pass it as input to the component like below.

<xng-breadcrumb seperator=">"></xng-breadcrumb>

Styling breadcrumbs: closes #5
The library uses the least specific selectors possible in order to make it easy to override them.
you can override by changing the CSS for classes .breadcrumb, .current-path, .separator etc with ::ng-deep

::ng-deep .breadcrumb {
  background-color: bisque;
  border: 1px solid;
}

Optional - default mapping of the route to breadcrumb label closes #2
To avoid breadcrumb labels showing by default even for routes that don't have breadcrumb configuration, set defaultMapping=false as input

<xng-breadcrumb [defaultMapping]="false"></xng-breadcrumb>