angular.dart.tutorial icon indicating copy to clipboard operation
angular.dart.tutorial copied to clipboard

Use arrayify formatter instead of keys.toList()

Open benbro opened this issue 11 years ago • 0 comments

Using the arrayify formatter in the template instead of the _categories list will simplify the code:

<span ng-repeat="category in cmp.categoryFilterMap | arrayify">
  <label>
    <input type="checkbox"
     ng-model="cmp.categoryFilterMap[category.key]">{{category.key}}
  </label>
</span>

https://github.com/angular/angular.dart.tutorial/blob/master/Chapter_06/lib/component/search_recipe_component.html#L10

https://github.com/angular/angular.dart.tutorial/blob/master/Chapter_06/lib/component/search_recipe_component.dart#L20

Arrayify formatter: https://github.com/angular/angular.dart/commit/d2780f8bb849c62d995d939d00594ebe93428631

benbro avatar May 12 '14 21:05 benbro