Here's an example of what I mean with using a directive.
This directive:
angular.module('directives', []).directive('alerter', function () {
return {
model: {
size: '@'
},
link: function ($scope, element, attrs, controller) {
alert(attrs.size)
}
};
});
Used like:
alert 10
alert 15
Will execute.