Dynamic parent label ?
Say I am on this breadcrumb:
App > Products > Pepsi > Edit
The parent of "Edit" is the Product "Pepsi". Except the name "Pepsi" is coming from ProductController's $scope. Because this $scope doesn't exist on the Edit view, my breadcrumb appears as (note where is it should say Pepsi its just blank:
App > Products > > Edit
I have the same issue. I set my Label in the ParentController (like you do with "Pespsi"). When I visit the EditContoller the ParentController is never fired, so the label isn't set.
E.g:
.state('modul.show', {
url: '/:modulId',
templateUrl: 'modul.tmpl.html',
controller: 'ModulShowController',
controllerAs: 'modul',
ncyBreadcrumb: {
label: 'Modul {{short}}',
parent: 'modul.index'
}
})
.state('exam.show', {
url: '/:examId',
templateUrl: 'exam.tmpl.html',
controller: 'ExamShowController',
controllerAs: 'exam',
ncyBreadcrumb: {
label: 'Exam {{ date }}',
parent: 'modul.show'
}
});
Inside your ChildController you have to set a value for the short variable because the ModulShowController is not called. But I only tried with $scope, not with controllerAs.