ng-sidebar icon indicating copy to clipboard operation
ng-sidebar copied to clipboard

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

Open Senneseph opened this issue 6 years ago • 1 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.

Senneseph avatar Apr 17 '19 18:04 Senneseph

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.


https://github.com/arkon/ng-sidebar/blob/23e651ca10cf9ea446a0ee9e60ae6d8bf523d281/src/sidebar.component.ts#L139

arkon avatar Jul 27 '19 21:07 arkon