Skip to content
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 dropdown option as breadcrumb element. Add maps for dropdown links. #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions dist/angular-breadcrumb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! angular-breadcrumb - v0.4.1-dev-2016-04-12
/*! angular-breadcrumb - v0.5.0-dev-2018-02-06
* http://ncuillery.github.io/angular-breadcrumb
* Copyright (c) 2016 Nicolas Cuillery; Licensed MIT */
* Copyright (c) 2018 Nicolas Cuillery; Licensed MIT */

(function (window, angular, undefined) {
'use strict';
Expand Down Expand Up @@ -93,6 +93,22 @@ function $Breadcrumb() {

conf.ncyBreadcrumbLink = $state.href(ref.state, parentParams || $stateParams || {});
conf.ncyBreadcrumbStateRef = stateRef;
if (conf.ncyBreadcrumb && conf.ncyBreadcrumb.breadcrumbAsDropdown) {

angular.forEach(conf.ncyBreadcrumb.breadcrumbDropdownOptions, function (dropdownOption) {

if (dropdownOption.link) {

var parsedLink = $state.href(dropdownOption.link, parentParams || $stateParams || {});

dropdownOption.disabled = (parsedLink === $state.current.ncyBreadcrumbLink);
dropdownOption.parsedLink = parsedLink;

}

});

}
chain.unshift(conf);
}
};
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-breadcrumb.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions release/angular-breadcrumb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! angular-breadcrumb - v0.5.0
/*! angular-breadcrumb - v0.5.1
* http://ncuillery.github.io/angular-breadcrumb
* Copyright (c) 2016 Nicolas Cuillery; Licensed MIT */
* Copyright (c) 2018 Nicolas Cuillery; Licensed MIT */

(function (window, angular, undefined) {
'use strict';
Expand Down Expand Up @@ -93,6 +93,22 @@ function $Breadcrumb() {

conf.ncyBreadcrumbLink = $state.href(ref.state, parentParams || $stateParams || {});
conf.ncyBreadcrumbStateRef = stateRef;
if (conf.ncyBreadcrumb && conf.ncyBreadcrumb.breadcrumbAsDropdown) {

angular.forEach(conf.ncyBreadcrumb.breadcrumbDropdownOptions, function (dropdownOption) {

if (dropdownOption.link) {

var parsedLink = $state.href(dropdownOption.link, parentParams || $stateParams || {});

dropdownOption.disabled = (parsedLink === $state.current.ncyBreadcrumbLink);
dropdownOption.parsedLink = parsedLink;

}

});

}
chain.unshift(conf);
}
};
Expand Down
Loading