I have a problem when angular\'s ng-change is called when model is changed programmatically.
$scope.sendMessage = function() {
$scope.message = \"Message sen
According to docs, you're right.
https://docs.angularjs.org/api/ng/directive/ngChange
but this seems to be a bug caused by the order in which the events are hooked up
The best way round it - with resorting to js handler (onchange)
$scope.$watch("mySelectBox", function(a,b) {
if (a.name!=b.name) {
$scope.message = "Message sent! (old="+b.name+', new='+a.name+')';
}
});
See plunk http://plnkr.co/edit/2ZbxS1tszppR9SrNqxVB?p=preview
HTH