Closed dhiraj-paryani closed 6 years ago
Hey! When using this polyfill within a SPA/JS framework, you need to hook into the your app's after mount/load lifecycle hook. In React, this is componentDidMount()
. I'm not sure what the Angular equivalent is - from their docs, it looks like it might be ngOnInit
or ngAfterContentInit
.
This polyfill is primarily meant to be used with standard/static served websites, so supporting SPAs is not something it will do out of the box. That is left to devs to implement on their own, via the globally-exposed objectFitPolyfill()
command. Hope that helps!
Hi, I am using this polyfill with angular 5 project.
When page is getting loaded first time, it is not adding css classess/styles, but if I do some resizing of screen(let's say I open debugger tools), then it is working fine.