ui-navigator-service

0.3.11 • Public • Published

ui-navigator-service

inject meta-info about the current route into your controllers and components

Screenshot

Demo

Check out the demo app to see it in action: demo app

You can also watch a free EmberScreencast that shows how to setup the addon and use it to create breadcrumbs.

Installation

Assumes Ember CLI > 0.2.3

ember install ui-navigator-service

Usage

By default this add-on will not inject itself automatically but you can do it where you need it by:

export default Ember.Route.extend({
  navigator: Ember.inject.service(),
  // ...
});

If however, you would like it to be auto-injected into certain objects you can specify that in your config/environment.js file. If, for instance, you wanted to have all Components get the service injected automatically, you would add the following:

module.exports = function(environment) {
  var ENV = {
    uiNavigator: {
      injectionFactories: [ 'component' ]
    }
  }
}

/ui-navigator-service/

    Package Sidebar

    Install

    npm i ui-navigator-service

    Weekly Downloads

    99

    Version

    0.3.11

    License

    MIT

    Last publish

    Collaborators

    • ksnyde