How can angular js watch attributes on custom directive in order to accept angular values to be bind
Here is what I have so far:
You can also use a new attribute for your directive instead of data-value:
new attribute
data-value
attrs.$observe('yourNewAttribute', function (newValue, oldValue) { if (newValue && newValue !== oldValue) { // ... } });