This is essentially my HTML. It is part of a responsive design so I cannot rely on fixed widths/heights:
<img ng-src="{{imageSrc}}" />
The value of $scope.imageSrc
is changed inside my controller and the view is updating properly.
But: At the point of time the image has finished rendering I need to get its clientWidth
and clientHeight
properties.
So how can I detect programmatically that
- the image has finished loading and
- the view has been fully updated with the rendered image
without using weird timeouts?