Open Squeezya opened 9 years ago
+1 - I need custom labels, depending on the received data
This should be possible by setting {{ vm.user.id }}
as the label. Unfortunately, in my case, this does not work when you refresh the page. The label will remain empty (this seems like a bug but I haven't reproduced this in a plunkr). So this will only work when you click from another page to /:idUser page.
Another possibility is to update the label in your controller, by doing:
$state.current.ncyBreadcrumb.label = 'Your custom breadcrumb here'
@vjanssens : Even $state.current.ncyBreadcrumb.label is also behaving similarly. It do not change the label first time but when you come second time on the same page.
Any one able to get this fixed??
As I mentioned here probably the reason is related to $interpolate.
Is there anyone that has figured out the solution. I'm trying a few things but couldn't find any solution yet.
Here is an old issue about this problem https://github.com/ncuillery/angular-breadcrumb/issues/42 Solved by injecting $breadcrumb into application .run method.
@ismatkurt Did you find a solution?
@go4varuntyagi : I used both
$state.current.ncyBreadcrumb.label = 'Your custom breadcrumb here';
$state.current.ncyBreadcrumbLabel = 'Your custom breadcrumb here';
Instead of only $state.current.ncyBreadcrumb.label = 'Your custom breadcrumb here'
and it worked.
hi, im not sure if i am doing this right but... I have this state:
And I want the label to be the user.id (user is on resolve) is it possible to do this? Use the resolve variables to dynamically do the ncy label?
Another thing, if i use controller as vm how can i use scope to make a dynamic label with {{ }} ?