Skip to content

Commit

Permalink
Merge pull request #29 from henrytao-me/master
Browse files Browse the repository at this point in the history
fix($breadcrumb): use $stateParams in case of unhierarchical states.
  • Loading branch information
ncuillery committed Jul 25, 2014
2 parents b8ead7c + 1c3c05e commit 4592bd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/angular-breadcrumb.js
Original file line number Diff line number Diff line change
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 4592bd9

Please sign in to comment.