Can anyone explain why the watch callback is triggered upon browser reload or Angular route change even when the old value and new value are the same? Here's an example:
$scope.test = "blah";
$scope.watch("test", function(new, old){
console.log(new === old);
}
Every time you reload the page or change routes away and back to that controller, the console log will show true. I had to add a guard inside the callback to prevent unnecessary callbacks. Did I make a mistake somewhere?