No description, website, or topics provided.
JavaScript
Pull request Compare This branch is 152 commits behind ncuillery:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
sample
src
test
.bowerrc
.coveralls.yml
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
LICENSE-MIT
README.md
bower.json
karma.conf.js
libpeerconnection.log
package.json

README.md

angular-breadcrumb

Build Status Coverage Status

Generate a breadcrumb from ui-router's states

In development

angular-breadcrumb is unusable for the moment. Basic functionalities are currently in development.

Roadmap

  • Build a breadcrumb presenting a step for each state in the current state's hierarchy
  • Display a human readeable label for each step in the breadcrumb
  • Build a working link for each step expect the last one.
  • Probably first release here ;-)
  • Reflection about templating (maybe not everybody want to use the bootstrap's breadcrumb)

Getting Started

Dependencies

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.

In your web page:

<script src="dist/angular-breadcrumb.min.js"></script>

Add dependency to your app module:

'ncy-angular-breadcrumb'

Use the directive `ncy-breadcrumb'

<div ncy-breadcrumb></div>

Documentation

Configuration of ui-router states

The breadcrumb is strongly based on ui-router. In order to build a human readable breadcrumb, it needs to have additional properties defined of each states : ncyBreadcrumbLabel This property define the label displayed by the angular-breadcrumb directive :

$stateProvider.state('home', {
  url: '/home',
  templateUrl: 'views/home.html',
  controller: 'HomeCtrl',
  data: {
    ncyBreadcrumbLabel: 'Home page'
  }
})

Every states that can be displayed in the breadcrumb must defined this property. If not, a state inherit the property from his parent. It results a breadcrumb including 2 states with the same label...

(Coming soon)

Examples

See sample here

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 Nicolas Cuillery
Licensed under the MIT license.