I have revealing module pattern which looks like this:
'use strict';
angular.module('app', [])
.directive('myDirective', ['SomeDep', function (SomeDep) {
var linker = function (scope, element, attr) {
// some work
};
return {
link: linker,
restrict: 'E'
};
}])
;
What I'm having trouble with is integrating a $watch into this. Specifically watching for window resize, with the '$window' service.
[EDIT]:
I realised what my issue was this whole time... I was restricting to element, when I forgot that I was implementing it as an attribute... @_@;