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

Unable to access $resolve for some components #187

Open soumyart opened 6 years ago

soumyart commented 6 years ago

Followed the approach described in #170 . But the $resolve is not getting resolved for some of the child state. While debugging found that for that particular state watcher is getting called twice and first one has the $resolve property while the second one doesn't have. Due to the order of calling $lastViewScope is getting updated with the later one which doesn't have any $resolve.

Detail Explanation:

My route is /pizza/{itemId}/details/

The /detail route has a component associated with it where as the sibling /history doesn't have any component associated with it. For the history route the itemId is getting populated in breadcrumb while for the details route the itemId is not getting populated.

But the for the child of details route the itemIdis getting populated properly.