I'm fairly new to angular and I have come across a problem when adding angular charts js. I have a list that filters on a searchtext. My problem is that i want my charts to update each time i filter the list.
What would be a good approach to tackle this problem? I've tried to watch changes in the result (filteredresult below) of the list but i cant get it to work
<li ng-repeat="item in filteredresult = (result | filter:searchText)>
You have to add listener:
$scope.$watch('searchText',function(newValue,oldValue){
//Some actions
})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.