Changed the window object to the angular one