This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Unable to watch the changes of the property '$' of an object which is used by filterFilter. #13313
Closed
Description
Unable to watch the changes of the property '$' of an object which is used by filterFilter.
//object to search
$scope.search = {'$': 'something...'}
//watch the object
$scope.$watch('search',
function (newValue, oldValue) {
//do action
results = filter(list, search);
...
}, true);
The "$" in the function filterFilter represents any property, however it represents built-in variable in the function equals(watch).
How to resolve the conflict between them?
filterFilter: https://github.com/angular/angular.js/blob/master/src/ng/filter/filter.js#L235
equals(watch): https://github.com/angular/angular.js/blob/master/src/Angular.js#L992
Smart-Table: https://github.com/lorenzofox3/Smart-Table/blob/master/src/stTable.js#L122