-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add ncyStateParams property #85
base: master
Are you sure you want to change the base?
Conversation
Add ncyStateParams to viewScope
Generate dist and release with ncyStateParams
Changes Unknown when pulling f28ce22 on davinci-studio:master into * on ncuillery:master*. |
@@ -212,6 +216,7 @@ function BreadcrumbDirective($interpolate, $breadcrumb, $rootScope) { | |||
scope.steps = $breadcrumb.getStatesChain(); | |||
angular.forEach(scope.steps, function (step) { | |||
if (step.ncyBreadcrumb && step.ncyBreadcrumb.label) { | |||
viewScope.ncyStateParams = $breadcrumb.getStateParams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, many thanks for the PR.
I don't understand why you attach the stateParams to the viewScope
here : it is the same scope of the one handled by the view controller (where you can already inject $stateParams and use it).
It make more sense if you attach the stateParams to the scope of the directive (scope
) in order to use it in custom templates. Maybe, is that you wanted to do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget an important part:
Before doing anything in your branch history, please can you revert changes on release/angular-breadcrumb.js
and release/angular-breadcrumb.min.js
?
I change these file only when I made a new release (it allows users to always have a stable version when they checkout the master).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I use translations in the breadcrumb label, eg. label: {{ 'breadcrumb.login.admin' | translate }}
by changing the last part of my translation key from stateParams (admin/company/user
). I had some troubles when I tried to inject the stateParams from controller scope and I was getting undefined
in some cases.
Revert changes from release directory? If you would like to add this changes to the official repository, of course.
Usage:
url: '/login/:userType',
ncyBreadcrumb: {
label: "{{ ncyStateParams.userType }}"
}