I want to understand how Chained Filters/Formatters execution in AngularDart via ng-repeat Directive work.
Can anyone explain how it works in clear and concise manner?
The referenced tutorial does not provide enough detail to get a completely grasp how AngularDart Chained Filter execution works. Below is what I understood from looking at documentation and reviewing portions of AngularDart source code.
Reference Link: http://runnable.com/UvL5t92j1pVCAAAQ/angular-dart-tutorial-chapter-05 original github post: https://github.com/angular/angular.dart.tutorial/issues/74
** Presumed Chain of Execution for Evaluating filters in ng-repeat**
Formatters/Filters gain access to list inside repeaters, such as ng-repeat
recipeList is provided via ng-repeat's scope to cf
cf=categoryfilter(list, map) --> categorizedList
fltr=filter (list, nameFilterString)--> filteredList, name
ordBy=orderBy(list, name)--> orderdList
- First get categories selected by user, pass list to next filter
- Filter on Inputted text with dependency on categories selected
- Order the list which was Filtered in 2 above base on default ascending order by name
- Create a html span for each item in list
Html View (from right to left: 1., 2., 3., 4. as indicated below):
< 4.ng-repeat=recipe in ordererdList | <==3.ordBy(fltr) | <== 2.fltr(cf, nameFilterstring) | <== 1. cf(recipeList , map < category, isChecked > ) >
I want to know how Lists (recipeList) in an angularDart repeater (ng-repeat) passes the list to each consecutive Chained Filter and confirm whether or not order of filters does matter (I believe they do). Is my understanding indicated above correct?
< li class="pointer"
ng-repeat="recipe in ctrl.recipes | orderBy:'name' | filter:{name:ctrl.nameFilterString} | categoryfilter:ctrl.categoryFilterMap" >
.... repeated dom elements omitted here for clarity
< /li >