ncuillery / angular-breadcrumb

Generate a breadcrumb from ui-router's states
http://ncuillery.github.io/angular-breadcrumb/
MIT License
785 stars 183 forks source link

Wiki addition #166

Open brunocoelho opened 7 years ago

brunocoelho commented 7 years ago

Hi @ncuillery, I tried to edit this wiki but I think it's not allowed for non-collaborators.

This is what I want to add just below State options as first property:

force

Gives the ability to show specific abstract states, even if options.includeAbstract is turned off in global configuration.

For example, this state's config:

$stateProvider.state('home', {
  url: '/home',
  templateUrl: 'views/home.html',
  ncyBreadcrumb: {
    label: 'Home'
  }
});

$stateProvider.state('list', {
  abstract: true,
  ncyBreadcrumb: {
    force: true,
    label: 'List',
    parent: 'home'
  }
});

$stateProvider.state('list.contact', {
  url: '/contact',
  templateUrl: 'views/contact.html',
  ncyBreadcrumb: {
    label: 'Contact'
  }
});

... will produce Home / List / Contact rather than Home / Contact.

Thanks!