I've encountered an issue where I can't seem to get the code working properly even though the question has been asked before.
Within my directive, I have found that the following piece of code functions correctly when the element's height increases, but it fails to work when the height decreases.
$scope.$watch(function () {
return element[0].offsetHeight;
},
function (value) {
console.log(value);
}
);
Edit: The reason for the height changes is due to me using ng-repeat in the parent controller.