Under my angular app
I'm using this code to set a custom body style :
constructor(private elementRef: ElementRef) { }
ngOnInit() {
this.elementRef.nativeElement.ownerDocument.body.style.overflowY = 'hidden';
}
for some specific scneario i myust add "important" to it
this would be like this :
this.elementRef.nativeElement.ownerDocument.body.style.overflowY = 'hidden !important';
But that is not working , and "important is not added to the style.
To note ; since i need to apply this for the body itself , and not to a specific html element unside my component , ngStyle cannot do it.
Suggestions ??