I'm using window.onload
inside my directive, and because of this sometimes my directive compiles and sometimes not.
Actually I need some external libraries for UMD, and that object is used in window.onload(native JS)
.
Its understood that the main cause is windows.onload
, but do somebody know conceptually where the actual problem is? do I need to change window.onload
or need to change app architecture? or what I can do to prevent this behavior? Its your call :)
Thanks