angular-breadcrumb
angular-breadcrumb copied to clipboard
Wrong parent link until refresh
Hi everyone,
The issue I'm facing is the following, I've got a state and his parent like this :
name: 'parentState',
url: '/parentState/:parentStateParam',
templateUrl: 'views/parentState.html',
controller: 'ParentStateController',
ncyBreadcrumb: {
label: '{{ labelName }}',
parent: 'home'
}
name: 'childState',
url: '/childState',
templateUrl: 'views/childState.html',
controller: 'ChildStateController',
ncyBreadcrumb: {
label: '{{ mainTitle }}',
parent: 'parentState({parentStateParam: childParam})'
}
labelName, childParam and mainTitle are defined in the scope of the ChildStateController and displayed properly. The issue occurs when I come from the parent state, in the url of the parent in the child breadcrumb the parameter is missing, but only the first time I come on this state, if I refresh, the url is the good one with the childParam.
The labelName and the childParam are defined in the same place and can be edited in the ChildStateController, when I edit those one, the label name is dynamically edited but not the link which is supposed to include childParam.
I also have added the $breadcrumb dependency in the run function.
Any idea anyone ?
same issue
Change the event that handles the update from $viewContentLoaded to $stateChangeSuccess