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

Recursive State parent is not possible #162

Open amitgaur208 opened 8 years ago

amitgaur208 commented 8 years ago

I have a hierarchy of categories. Like: Clothing > Apparel > Printed >Customized etc. And I have created an state for category Detail like:

.state('root.categoryDetail', {
             url: '/categoryDetail/:slug',
             templateUrl: 'views/products/category-detail.html',
             controller: 'CategoryDtlCtrl',
             ncyBreadcrumb: {
                  label: '{{category.name}}',
                  parent: function ($scope) {
                       //return $scope.no_parent ? 'root.home' : 'root.categoryDetail';
                   },
              }
})

But I am not to make parent itself in ncyBreadcrumbParent.

I really want to use same state for all level categories with proper breadcrumb. Please help. If it's possible.