Skip to content

Commit

Permalink
fix($breadcrumb) use $stateParams in case of unhierarchical states. #29
Browse files Browse the repository at this point in the history
  • Loading branch information
henrytao-me committed Jul 14, 2014
1 parent 3c19f89 commit 1c3c05e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/angular-breadcrumb.js
Expand Up @@ -18,7 +18,7 @@ function $Breadcrumb() {
angular.extend($$options, options);
};

this.$get = ['$state', '$rootScope', function($state, $rootScope) {
this.$get = ['$state', '$stateParams', '$rootScope', function($state, $stateParams, $rootScope) {

var $lastViewScope = $rootScope;

Expand Down Expand Up @@ -57,7 +57,7 @@ function $Breadcrumb() {
}

if(!state.abstract && !$$isStateDataProperty(state, 'ncyBreadcrumbSkip')) {
state.ncyBreadcrumbLink = $state.href(state.name);
state.ncyBreadcrumbLink = $state.href(state.name, $stateParams || {});
chain.unshift(state);
}
};
Expand Down

0 comments on commit 1c3c05e

Please sign in to comment.