binding an event on window resizing
initialize function in angular controller