OLD | NEW |
1 library todomvc.web.elements.td_model; | 1 library todomvc.web.elements.td_model; |
2 | 2 |
3 import 'dart:html'; | 3 import 'dart:html'; |
4 import 'package:polymer/polymer.dart'; | 4 import 'package:polymer/polymer.dart'; |
5 import '../lib-elements/polymer_localstorage.dart'; | 5 import '../lib-elements/polymer_localstorage.dart'; |
6 | 6 |
7 class Todo extends Observable { | 7 class Todo extends Observable { |
8 @observable String title; | 8 @observable String title; |
9 @observable bool completed = false; | 9 @observable bool completed = false; |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 items.removeWhere(filters['completed']); | 92 items.removeWhere(filters['completed']); |
93 } | 93 } |
94 | 94 |
95 void setItemsCompleted(bool completed) { | 95 void setItemsCompleted(bool completed) { |
96 for (var item in items) { | 96 for (var item in items) { |
97 item.completed = completed; | 97 item.completed = completed; |
98 } | 98 } |
99 itemsChanged(); | 99 itemsChanged(); |
100 } | 100 } |
101 } | 101 } |
OLD | NEW |