I have:
$scope.$watch('option.sSubject', function (newValue, oldValue) {
if (newValue !== oldValue) {
and
console.log(newValue)
1
undefined
console.log(oldValue)
1
undefined
Can someone explain why the watch works when there seems to be no change in value. Please note that this is when I just open the page.
user1464139
source
share