I have an angular directive which is initialized like so:
angular.module('app').directive('conversation', function() { return { restrict: 'E', link: function ($scope, $elm, $attr) { $scope.$watch("some_prop", function (newValue, oldValue) { var typeId = $attr.type-id; // Your logic. }); } }; }