If we click on the admin settings icon the drop-down menu appears and disappears.
Noticed that this happens only when the DOM is rerendered after every service call (/api/report/services).
Whenever there are new services It would cause ngRepeat to remove all
elements of existing services and create them again, which might be expensive. That means a lot of DOM operations.
Track by to the rescue in Angular 1.2 a new addition was made to the syntax of ngRepeat: the amazingly awesome track by clause. It allows you to specify your own key for ngRepeat to identify objects by, instead of just generating unique IDs.
Required change
ng-repeat="row in $data | filter:serviceFilter track by row.service.id"
If we click on the admin settings icon the drop-down menu appears and disappears.
Noticed that this happens only when the DOM is rerendered after every service call
(/api/report/services).
Whenever there are new services It would cause ngRepeat to remove all
Track by to the rescue in Angular 1.2 a new addition was made to the syntax of ngRepeat: the amazingly awesome track by clause. It allows you to specify your own key for ngRepeat to identify objects by, instead of just generating unique IDs.
Required change
ng-repeat="row in $data | filter:serviceFilter track by row.service.id"