Collapse Sidebar Menu on Rdash Angular

4.6k views Asked by At

Can we collapse sidebar menu on Rdash Angular?

For example, on http://rdash.github.io/#/.

Under Dashboard we can found Profile, Graphic, Manage Data. And under Tables we can found Statistic, Report.

Thanks.

1

There are 1 answers

0
apurv On BEST ANSWER

You can do something like this

<div class="sidebar col-xs-2" 
     ng-class="{ 'col-xs-1': open, 'toggleOn': open, 'toggleOff': !open }">
   <button ng-click="open = !open">Toggle</button>            
</div>


.sidebar {
    color: #fff;
    height: 100vh;
}

.toggleOn {
    transition: width 1s;
    -webkit-transition: width 1s;        
    -moz-transition: width 1s;        
    -o-transition: width 1s;
}

.toggleOff {
    transition: width 1s;
    -webkit-transition: width 1s;        
    -moz-transition: width 1s;        
    -o-transition: width 1s;
}