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

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

Issue 26051002: Updating Polymer to derive from custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: samples/third_party/todomvc/web/router_options.dart
diff --git a/samples/third_party/todomvc/web/router_options.dart b/samples/third_party/todomvc/web/router_options.dart
index 5513afbad3a74f259a8abb04a3f0186397275013..dd543b64d6ea11013cf44eac8758ebf927b467f7 100644
--- a/samples/third_party/todomvc/web/router_options.dart
+++ b/samples/third_party/todomvc/web/router_options.dart
@@ -15,14 +15,18 @@ import 'package:polymer/polymer.dart';
* have a tag like `<a href="#/completed">` it will get the class
* `class="selected"`, and other links will have that CSS class removed.
*/
-@CustomTag('router-options')
+@CustomTag('router-options', type: RouterOptions)
class RouterOptions extends PolymerElement {
+ factory RouterOptions() => new Element.tag('router-options');
+
+ RouterOptions.created() : super.created();
+
bool get applyAuthorStyles => true;
var _sub;
- void inserted() {
- super.inserted();
+ void enteredView() {
+ super.enteredView();
var anchors = this.queryAll('a');
@@ -42,8 +46,8 @@ class RouterOptions extends PolymerElement {
_sub = windowLocation.changes.listen(_updateHash);
}
- void removed() {
+ void leftView() {
_sub.cancel();
- super.removed();
+ super.leftView();
}
}

Powered by Google App Engine
This is Rietveld 408576698