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

Side by Side Diff: samples/third_party/todomvc/web/model.dart

Issue 24149003: Port of github.com/polymer/polymer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library model; 5 library todomvc.web.model;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 8
9 final appModel = new AppModel._(); 9 final appModel = new AppModel._();
10 10
11 class AppModel extends ObservableBase { 11 class AppModel extends ObservableBase {
12 final ObservableList<Todo> todos = new ObservableList<Todo>(); 12 final ObservableList<Todo> todos = new ObservableList<Todo>();
13 @observable int doneCount; 13 @observable int doneCount;
14 @observable int remaining; 14 @observable int remaining;
15 @observable List<Todo> visibleTodos; 15 @observable List<Todo> visibleTodos;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 class Todo extends ObservableBase { 61 class Todo extends ObservableBase {
62 @observable String task; 62 @observable String task;
63 @observable bool done = false; 63 @observable bool done = false;
64 64
65 Todo(this.task); 65 Todo(this.task);
66 66
67 String toString() => "$task ${done ? '(done)' : '(not done)'}"; 67 String toString() => "$task ${done ? '(done)' : '(not done)'}";
68 } 68 }
OLDNEW
« no previous file with comments | « samples/third_party/todomvc/web/editable_label.html ('k') | samples/third_party/todomvc/web/router_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698