arkon / ng-sidebar

[Inactive] Angular sidebar component.

Home Page:https://echeung.me/ng-sidebar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sidebar doesn't animate unless `opened` property is bound.

Senneseph opened this issue · comments

I was going crazy trying to figure out why my sidebar was simply popping into existence instead of smoothly sliding open like in the demo.

So I made a stackblitz to figure out what I was doing wrong: https://stackblitz.com/edit/angular-hbfacn

The only difference between the top and bottom sections is [(opened)]="_opened" on <ng-sidebar>.

This wasn't mentioned in the docs so I assume it is a bug.

commented

This is due to a workaround for the sidebar being visible on initial load, which basically turns off animate on load and re-enables it once it's triggered to be opened/closed again.

I've yet to think of a good fix for this.


// Delay initial animation (issues #59, #112)