Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

ng sidebar not hiding initially if opened set to false #195

Open
jomol-aima opened this issue Dec 13, 2019 · 1 comment
Open

ng sidebar not hiding initially if opened set to false #195

jomol-aima opened this issue Dec 13, 2019 · 1 comment

Comments

@jomol-aima
Copy link

jomol-aima commented Dec 13, 2019

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
Copy link

lasantha57 commented Jun 16, 2020

@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;
    });
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants