-
Notifications
You must be signed in to change notification settings - Fork 184
Getting started
ncuillery edited this page Oct 29, 2014
·
8 revisions
angular-breadcrumb requires ui-router in minimal version 0.2.0 (when the method $state.get
was added).
Download the production version or the development version.
Or download it with bower : open a terminal and run
bower install angular-breadcrumb
Include the js your web page:
<script src="[...]angular-breadcrumb[.min].js"></script>
Add dependency to your app module:
'ncy-angular-breadcrumb'
The module is now installed. It exposes the $breadcrumb
service and the ncy-breadcrumb
directive.
Configure the ui-router (see the ui-router project).
Define a ncyBreadcrumb.label
property to each states
$stateProvider.state('home', {
url: '/home',
templateUrl: 'views/home.html',
controller: 'HomeCtrl',
ncyBreadcrumb: {
label: 'Home page'
}
})
Use the directive ncy-breadcrumb
<div ncy-breadcrumb></div>
Let the magic begin !
See the API reference page for all the configuration options :