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

hide parent crumb if parent is current. #163

Open
DickSwart opened this issue Aug 27, 2016 · 2 comments
Open

hide parent crumb if parent is current. #163

DickSwart opened this issue Aug 27, 2016 · 2 comments

Comments

@DickSwart
Copy link

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.

@ravimallya
Copy link

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>

@ultralabed
Copy link

Yes, I would kindly want to know if it is possible to 'hide parent crumb if parent is current'? Thanks~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants