sovanna / angular-material-sidenav

Simple component that reproduce the Angular Material Style SideNav Menu from their own website
http://sovanna.github.io/angular-material-sidenav/
109 stars 55 forks source link

support use type 'link' in section.children and make currentPage more flexible #16

Closed zack24q closed 8 years ago

zack24q commented 8 years ago

we can use type 'link' in the lever 2, like this: { id: 'lever1', name: 'lever1', type: 'heading', children: [ { id: 'lever11', name: 'lever11', state: 'main.page11', type: 'link' }, { id: 'lever12', name: 'lever12', type: 'toggle', pages: [ { id: 'lever121', name: 'lever121', state: 'main.page121' }, { id: 'lever122', name: 'lever122', state: 'main.page122' } ] } ] }

zack24q commented 8 years ago

I think it is more flexible, for example i can get the name from currentPage and display it in page.$scope.title = ssSideNav.currentSection.name;

sovanna commented 8 years ago

nice, thx ;)