angular-breadcrumb icon indicating copy to clipboard operation
angular-breadcrumb copied to clipboard

Wrong parent link until refresh

Open valentinlamatte opened this issue 9 years ago • 2 comments

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 ?

valentinlamatte avatar Jun 29 '16 14:06 valentinlamatte

same issue

maxhan247 avatar Jul 26 '16 16:07 maxhan247

Change the event that handles the update from $viewContentLoaded to $stateChangeSuccess

vicpon avatar Aug 22 '16 01:08 vicpon