Can I add any attribute to 'window' object in Angular? Some thing like:
window.attr = "my_value"
I try tu use the object windows bat have the error:
Property 'attr' does not exist on type 'Window'.
Can I add any attribute to 'window' object in Angular? Some thing like:
window.attr = "my_value"
I try tu use the object windows bat have the error:
Property 'attr' does not exist on type 'Window'.
Try casting window to any
like
(window as any).attr = "my_value"
Or define type on the top of the component after your imports
declare var window: any;