I'm encountering a problem while utilizing $scope.$watch in my ES6 project. The watch triggers once and then doesn't work thereafter.
Below is the snippet of code:
export class SomeController {
constructor($log, $scope) {
'ngInject'
this.watched = 1;
$scope.$watch('watched',(nv,ov)=>{
$log(nv); //only fires once
});
}
otherMethods(){}...
}
Specifically, I am utilizing this generator: https://github.com/Swiip/generator-gulp-angular