Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: samples/third_party/todomvc/scripts/components.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/third_party/dromaeo/common/Interval.dart ('k') | samples/ui_lib/base/Device.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** Component representing one todo list element. */ 5 /** Component representing one todo list element. */
6 class TodoListElement implements WebComponent { 6 class TodoListElement implements WebComponent {
7 ShadowRoot _shadowRoot; 7 ShadowRoot _shadowRoot;
8 Element element; 8 Element element;
9 Todo todo; 9 Todo todo;
10 Todos model; 10 Todos model;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } else { 154 } else {
155 _footer.query('#todo-count').innerHTML = 155 _footer.query('#todo-count').innerHTML =
156 '<strong>$uncomplete</strong> items left'; 156 '<strong>$uncomplete</strong> items left';
157 } 157 }
158 _clearCompleted.innerHTML = 158 _clearCompleted.innerHTML =
159 'Clear completed ' 159 'Clear completed '
160 '(${model._todos.length - model.remaining})'; 160 '(${model._todos.length - model.remaining})';
161 } 161 }
162 } 162 }
163 163
164 Todos get model() => _model; 164 Todos get model => _model;
165 165
166 void created() { 166 void created() {
167 _footer = _shadowRoot.query('#footer'); 167 _footer = _shadowRoot.query('#footer');
168 _clearCompleted = _shadowRoot.query('#clear-completed'); 168 _clearCompleted = _shadowRoot.query('#clear-completed');
169 } 169 }
170 170
171 void inserted() { 171 void inserted() {
172 updateCount(null); 172 updateCount(null);
173 var toggleAll = _shadowRoot.query('#toggle-all'); 173 var toggleAll = _shadowRoot.query('#toggle-all');
174 toggleAll.on.change.add((event) { 174 toggleAll.on.change.add((event) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if (trimmedStr != '') { 211 if (trimmedStr != '') {
212 model.addTodo(new Todo(trimmedStr)); 212 model.addTodo(new Todo(trimmedStr));
213 input.value = ''; 213 input.value = '';
214 } 214 }
215 } 215 }
216 }); 216 });
217 } 217 }
218 void attributeChanged(String name, String oldValue, String newValue) { } 218 void attributeChanged(String name, String oldValue, String newValue) { }
219 void removed() { } 219 void removed() { }
220 } 220 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/common/Interval.dart ('k') | samples/ui_lib/base/Device.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698