SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 188 JavaScript

fix($rootScope): remove support for a watch action to be a string

BREAKING CHANGE:

Previously, it was possible for an action passed to $watch
to be a string, interpreted as an angular expresison. This is no longer supported.
The action now has to be a function.
Passing an action to $watch is still optional.

Before:

```js
$scope.$watch('state', ' name="" ');
```

After:

```js
$scope.$watch('state', function () {
  $scope.name = "";
});
```

Closes #8190
R
rodyhaddad committed
02c0ed27bc375d5352fefdd7e34aad9758621283
Parent: 3dafcba