ng sidebar not hiding initially if opened set to false
jomol-aima opened this issue · 1 comments
jomol-aima commented
Hi,
I am experiencing this issue again. In my case, I have lazy loaded the module. I have a header component with toggle button, and a sidebar component. Included the header and sidebar component to the dashboard via component selector. Whenever I reload the page, the sidebar is initially showing and then hiding. If I check toggle state outside of the sidebar, then it working fine, but that time animation not work. I couldn't find the issue. Can you help me?
lasantha57 commented
@jomol-aima Problem is with the [animate]="true". Either you can remove it or this workaround would work.
animate = false;
ngOnInit() {
setTimeout(() => {
this.animate = true;
});
}