@ovh-ux/ng-ui-router-breadcrumb
v1.3.1
Published
Display a breadcrumb based on the UI-Router state declaration.
Downloads
54
Readme
ng-ui-router-breadcrumb
Display a breadcrumb based on the UI-Router state declaration.
Install
yarn add @ovh-ux/ng-ui-router-breadcrumb
Usage
breadcrumb
resolve
import angular from 'angular';
import ngUiRouterBreadcrumb from '@ovh-ux/ng-ui-router-breadcrumb';
import uiRouter from '@uirouter/angularjs';
angular.module('myApp', [ngUiRouterBreadcrumb, uiRouter]).config(
/* @ngInject */ ($stateProvider) => {
$stateProvider.state('foo', {
url: '/foo',
template: '<h2>Foo</h2>',
resolve: {
breadcrumb() {
return 'foo';
},
},
});
},
);
hideBreadcrumb
resolve
This is meant to be used if you want to hide the breadcrumb for some state but display it for some children.
import angular from 'angular';
import ngUiRouterBreadcrumb from '@ovh-ux/ng-ui-router-breadcrumb';
import uiRouter from '@uirouter/angularjs';
angular.module('myApp', [ngUiRouterBreadcrumb, uiRouter]).config(
/* @ngInject */ ($stateProvider) => {
$stateProvider.state('foo', {
url: '/foo',
template: '<h2>Foo</h2>',
resolve: {
breadcrumb() {
return 'foo';
},
hideBreadcrumb() {
return true;
},
},
});
},
);
Test
$ yarn test
Related
- @ovh-ux/ng-ui-router-layout - Enhance UI-Router by adding a layout decorator to deal with an UI Bootstrap modal instance
- @ovh-ux/ng-ui-line-progress - Display a line progress between UI-Router transition hooks
Contributing
Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.
License
BSD-3-Clause © OVH SAS