AngularJS change image style after loaded

Sometimes you need place image at center of div tag. The script below will help you calculate the size of image and change margin-top to set image into right position.

It is AngularJS and CoffeeScript