ng2-qbreadcrumb
ng2-qbreadrumb is a component for Angular
Demo
Install
You can get it on npm.
npm install ng-qbreadcrumb --save vc
Setup
You'll need to add BreadCrumbModule
to your application module.
;
Usage
;
Directive
Input
Property Name | Type | Description |
---|---|---|
ids | Array | the breadcrumb component will watch ids's change and update data or send request |
options | Options | set your own breadcrumb option |
Options
Output
Property Name | Type | Description |
---|---|---|
rootClickEvent | Function | call this Function when user click root event,usage for when you set root node |
breadNodeClickEvent | Function | call this Function when user click breadcrumb node |
BreadcrumbService
This service exposes a few different methods with which you can interact with ng-qbreadcrumb
.
BreadcrumbService.hideRoute(name: string)
hide a node which you do not want to show
BreadcrumbService.isRouteHidden(name: string)
check the node is hide or not
BreadcrumbService.setRootNode(name: Array<string> | string)
set root node/nodes for breadcrumb,can be the string
for single root or Array
BreadcrumbService.getRootNodes()
get root of the breadcrumb