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

Unified Diff: samples/third_party/todomvc/web/editable_label.dart

Issue 24149003: Port of github.com/polymer/polymer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: samples/third_party/todomvc/web/editable_label.dart
diff --git a/samples/third_party/todomvc/web/editable_label.dart b/samples/third_party/todomvc/web/editable_label.dart
index e1b6115b2a83e95882ac98e9c8bc999a3218a466..eafb7d2f0e2689b8981b77c354075637e393e178 100644
--- a/samples/third_party/todomvc/web/editable_label.dart
+++ b/samples/third_party/todomvc/web/editable_label.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library editable_label;
+library todomvc.web.editable_label;
import 'dart:html';
import 'package:polymer/polymer.dart';
@@ -11,9 +11,10 @@ import 'package:polymer/polymer.dart';
* Label whose [value] can be edited by double clicking. When editing, it
* displays a form and input element, otherwise it displays the label.
*/
-class EditableLabel extends PolymerElement with ObservableMixin {
+class EditableLabel extends PolymerElement {
@observable bool editing = false;
- @observable String value = '';
+ @published String value = '';
+
bool get applyAuthorStyles => true;
InputElement get _editBox => getShadowRoot("editable-label").query('#edit');
@@ -46,5 +47,5 @@ class EditableLabel extends PolymerElement with ObservableMixin {
}
void main() {
- registerPolymerElement('editable-label', () => new EditableLabel());
+ Polymer.register('editable-label', EditableLabel);
blois 2013/09/27 21:40:52 Any idea why this uses the explicit register rathe
Jennifer Messerly 2013/09/30 17:44:37 to show off (and test) the alternate form.
}

Powered by Google App Engine
This is Rietveld 408576698