I want to disable overflow-y: hidden
style for only one component. This style is in my style.scss like so
body {
overflow-y: hidden;
}
I tried this in my component but it did not work.
<div class="div1" style="overflow-y: visible !important;">
...
</div>
Can you try to put
.visibleClass{overflow-y: visible ;}
to style.css under body css attribute
in appcomponent.html add activate event to router-outlet
<router-outlet (activate)="showHideNav($event)"></router-outlet>
then in component.ts
showHideNav(event){
event instanceof YourComponent ? document.body.classList.add("visibleClass") :
document.body.classList.remove("visibleClass")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With