Topic: SideNav does not remove fixed-sn on destroy
I am using *ngIf to show/hide the sidenav in the Angular version. I noticed the "fixed-sn" class is being added to the main DOM element when the component is initialized, but it appears to leave it on the main DOM node when being destroyed. I managed to fix this by doing the following:
constructor(private rd: Renderer2) { }
ngOnDestroy () { this.rd.removeClass(document.body, 'fixed-sn'); }
While this fixes my issue, I imagine other people will want this in the future. Can this be incorporated into the Sidenav by default?
Arkadiusz Idzikowski staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No