Asaf Agranat
Member since Jan 8, 2019
- Profile: /members/13859-asaf-agranat.htm
- Comments: 2
Recent Blog Comments By Asaf Agranat
-
Prevent Body Scrolling With A WindowScrolling Service When Showing A Modal Window In Angular 5.0.2
Posted on Jan 8, 2019 at 12:23 PM
@Ben, I think you're right about coupling. Something's gotta give in a real-world app. Regarding using that approach, I believe it's somewhere in the middle: it's not recommended by best practice, but Angular seems to be using it internally in their APIs, as can be seen here: https://g... read more »
-
Prevent Body Scrolling With A WindowScrolling Service When Showing A Modal Window In Angular 5.0.2
Posted on Jan 8, 2019 at 7:57 AM
Thanks for the article Ben. In fact you can inject Renderer into a service using RenderFactory. This is the same service, using renderer2: import { Injectable, Renderer2, RendererFactory2, RendererStyleFlags2 } from '@angular/core'; const importantFlag = RendererStyleFlags2.Important ... read more »