In your linking link $ function, see the scope property:
myApp.directive('mydirective', function () { return { link: function (scope, element, attrs) { scope.$watch('boundtoscope', function(newValue) { alert('boundtoscope changed');
If the boundtoscope is an array or map of objects, and you want to look for changes in the elements in the array / object, set the objectEquality parameter to true to execute the "small" hours (i.e. compare the array / object for equality, not for reference):
scope.$watch('boundtoscope', function(newValue) { alert('boundtoscope changed') }, true);
Angular 1.2 adds a new method for this $ watchCollection :
scope.$watchCollection('boundtoscope', function(newValue) { alert('boundtoscope changed') });
source share