-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic label management #156
Comments
+1 My use case is that in my app some users view pages that belong to users where the label is dependent on context (e.g. an ancestor state might be "My Profile" vs. "Username Profile"). In cases like this, the |
+1 |
Do you have a workaround for now ? I would like to display : users > $username > profile <--- $username is returned from a resolve. It is really a must. Hope someone can implement it. |
Okay well for now I fixed it... (tricky) like that. Maybe it can help someone for now. I wanted this feature: my controller can update the last breadcrumb label dinamically
Hope this help someone. (We use this till we upgrade to angular2 so it's acceptable) |
It will be better to have the possibility to manage the value of the label by a function defined in the route config like below:
ncyBreadcrumb: {
label: function ($scope) {
if ($scope.suiteNumber){
return 'suite';
}else{
return 'room';
}
},
parent: function ($scope) {
return $scope.from || 'room';
}
}
Then all the logic will be in the route config rather than in the controller.
It will result in more readable and maintenable code in both route config and controller source files
The text was updated successfully, but these errors were encountered: