Open Necko75 opened 10 years ago
I have met this bug few months ago, I solved it by upgrading the ui-router to the version 0.2.10.
Which version of ui-router do you use ?
I use ui-router version 0.2.11 and the bug is still there. I replaced $viewContentLoaded with $stateChangeSuccess and worked like a charm.
Thanks @geobourazanas , that change has solved my problem too.
@ncuillery @geobourazanas
Excuse me I encounter the same problem.
It is something fixed now ? I tried to use :
$rootScope.$on('$viewContentLoaded', function () {
renderBreadcrumb();
});
$rootScope.$on('$stateChangeSuccess', function () {
renderBreadcrumb();
});
but it doesn't know the method "renderBreadcrumb();" do I have to edit the directive directly ???
Thank you for your tips :)
Hi,
There is a bug with the function $viewContentLoaded in your directive. I have nested states which are calling the same controller, and the same view template html. In my controller, in terms of the childs states, I apply filters on my template results. So, the state change but not the breadcrumb.
In order to fix it, I have added a listener on $stateChangeSuccess.
I am not sure how ui-rooter works, but if the templateUrl not change, so the event $viewContentLoaded is not triggered ...