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

Sidebar is initially visible on IE 11

Open stevenswan opened this issue 7 years ago • 2 comments

Version: 8.0.0

Hi,

On IE 11 in the demo and in my application the side bar is initially visible then slides out of view. This is probably related to issue #59.

A work around I have used in my application is to create a property in your component that OnInit changes wrapped in a setTimeout()

  ngOnInit(): void {
    setTimeout(() => {
      this.animate = true;
    });
  }

Then use this property in your animate input on the ng-sidebar component

stevenswan avatar Oct 08 '18 13:10 stevenswan

This issue applies to Chrome (v70) as well. As another workaround, I used the [hidden] directive to enable the sidebar after view initialization:

HTML:

<ng-sidebar [hidden]="sidebarDisabled"></ng-sidebar>

TS:

public sidebarDisabled = true;

ngAfterViewInit() {
  setTimeout(() => {
    this.sidebarDisabled = false;
  });
}

almeidap avatar Nov 13 '18 13:11 almeidap

almeidap, worked like a charm. THANKS !!!!!

aplongh avatar Feb 27 '19 20:02 aplongh