lega911 / angular-light

Alight is a library for building interactive MVVM web interfaces/applications. (project is deprecated)
MIT License
274 stars 43 forks source link

$scope.$watch is not a function in 0.13 ? #234

Closed KINKCreative closed 7 years ago

KINKCreative commented 7 years ago

Title says it all. I seem to have trouble using $watch, basically a piece of code that worked. I noticed I am running 0.13. It does work with 0.12.30 so I am curious if there's a breaking change.

e.g $scope.$watch('query', function(newValue) { console.log(newValue)});

lega911 commented 7 years ago

0.13 has $watch (which uses ChangeDetector.watch), example https://jsfiddle.net/lega911/ubgv96ce/ the biggest change in 0.13, there are no local variables from al-repeat in scope, they are available via $getValue and declarative binding.

0.14 doesn't have scope and $watch, it uses ChangeDetector.watch directly.