angular-breadcrumb
angular-breadcrumb copied to clipboard
hide parent crumb if parent is current.
Hi thanx for this great module, I would like to know if it is possible to not show the breadcrumb if the parent state is the current state?
To explain a bit more, lets say I have a 'Dashboard' state that I will set as prefixStateName so that all breadcrumb will have the Dashboard as the first step. But when I'm on the dashboard I don't want to display any breadcrumb.
Not on dashboard: Dashboard / Something / SomethingElse
(Something is not a child state of Dashboard)
On Dashboard: Don't display breadcrumbs.
Yes. this is what I also wanted to know.
$stateProvider
.state('main', {
abstract: true,
url: '',
templateUrl: '/app/views/pages/landing-main.html',
data: {
requireLogin: false
}
})
.state('main.home', {
parent: 'main',
url: '/',
templateUrl: '/app/views/pages/landing-main/home.html',
controller: 'mainCtrl',
ncyBreadcrumb: {
label: 'Home'
}
})
.state('main.aboutus', {
parent: 'main',
url: '/about-us',
templateUrl: '/app/views/pages/static_pages/aboutus.html',
data: {
requireLogin: false
},
ncyBreadcrumb: {
label: 'About Us'
}
})
I wanted to hide the breadcrumbs for main.home
state. I've added following HTML to landing-main.html
template.
<div class="container">
<div ncy-breadcrumb></div>
</div>
Yes, I would kindly want to know if it is possible to 'hide parent crumb if parent is current'? Thanks~!