using  instead of window when accessing the angular global