How can i be notified when a directive is resized? i have tried
element[0].onresize = function() { console.log(element[0].offsetWidth + \" \" +
Use scope.$watch with a custom watch function:
scope.$watch( function () { return [element[0].offsetWidth, element[0].offsetHeight].join('x'); }, function (value) { console.log('directive got resized:', value.split('x')); } )