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

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

Issue 23224003: move polymer.dart into dart svn (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add --deploy to todomvc sample Created 7 years, 4 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
« no previous file with comments | « samples/third_party/todomvc/web/router_options.dart ('k') | samples/third_party/todomvc/web/todo_row.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/third_party/todomvc/web/router_options.html
diff --git a/samples/third_party/todomvc/web/router_options.html b/samples/third_party/todomvc/web/router_options.html
index 7f568a25216a80fad710cfb6e4316d0b92310e92..7f92936e6c1d9f19f6dcf9224eea7137e26adc21 100644
--- a/samples/third_party/todomvc/web/router_options.html
+++ b/samples/third_party/todomvc/web/router_options.html
@@ -9,45 +9,9 @@ BSD-style license that can be found in the LICENSE file.
<meta charset="utf-8">
</head>
<body>
-<element name="router-options" extends="ul" apply-author-styles>
+<polymer-element name="router-options" extends="ul">
<template><content></content></template>
- <script type="application/dart">
- import 'dart:html';
- import 'package:web_ui/web_ui.dart';
- import 'package:web_ui/observe/html.dart';
-
- /**
- * Given a set of child links to this page, this will add the "selected" CSS
- * class to the link that matches window.location.hash.
- *
- * For example, if the current window.location.hash is "#/completed" and we
- * have a tag like `<a href="#/completed">` it will get the class
- * `class="selected"`, and other links will have that CSS class removed.
- */
- class RouterOptions extends WebComponent {
-
- var _stopWatcher;
-
- void inserted() {
- super.inserted();
-
- var anchors = this.queryAll('a');
-
- _stopWatcher = watchAndInvoke(() => locationHash, (e) {
- var hash = e.newValue;
- if (hash == '') hash = '#/';
- for (var a in anchors) {
- updateCssClass(a, a.hash == hash, 'selected');
- }
- });
- }
-
- void removed() {
- _stopWatcher();
- super.removed();
- }
- }
- </script>
-</element>
+ <script type="application/dart" src="router_options.dart"></script>
+</polymer-element>
</body>
</html>
« no previous file with comments | « samples/third_party/todomvc/web/router_options.dart ('k') | samples/third_party/todomvc/web/todo_row.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698