There is an array as below, which stores a mixture of data and styles in it.
User is able to add, remove or re-order its elements, as well as modify value of elements, so I need to watch it with $scope.$watch to do something if it's modified.
However, I don't want to get notified if only its style changes. Is there any better practice to arrange my data, to get notified only if value is changed, thank you.
[{
value: 1,
selected: true,
width: '100px'
}, {
value: 2,
width: '150px'
}, {
value: 3,
width: '100px'
}];
value? (2) should the watcher also ignore any shuffling of the order of the data? (3) watcher definitely preferable to ng-change, etc?<input>, so I don't think ng-change is applicable. Thanks..