I am using the Angular Breadcrumb directive (found here: https://github.com/ncuillery/angular-breadcrumb) which uses UI-Router to formulate breadcrumbs.
This works great out of the box and is fine for simple breadcrumb navigation. However, what I'd like to do is be able to click on the Application crumb, to display a dropdown and would allow me to select other applications. Choosing a different application would then change the URL dynamically.
Here's what I've got so far, but not sure how I could edit the displayName
to change the breadcrumb structure when you select a different application.
index.html
<div class="app-breadcrumbs-container">
<ui-breadcrumbs
displayname-property="data.displayName"
template-url="/shared/templates/breadcrumbs.html">
</ui-breadcrumbs>
</div>
breadcrumbs.html
<div class="app-breadcrumb" flex>
<ol>
<li ng-repeat="crumb in breadcrumbs"
ng-class="{ active: $last }">
<a ui-sref="{{ crumb.route }}" ng-if="!$last">{{ crumb.displayName }} </a><span ng-show="$last">{{ crumb.displayName }}</span>
<i ng-hide="$last" class="material-icons">keyboard_arrow_right</i>
</li>
</ol>
</div>
stateprovider example
.state('apps', {
url: '',
views: {
'content@': {
templateUrl: 'index.html'
}
},
data: {
displayName: 'Application'
}
}