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

Unified Diff: example/todomvc/router_options.html

Issue 12225039: Support for observable models, fixes #259 (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 10 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 | « example/todomvc/model.dart ('k') | lib/observe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/todomvc/router_options.html
diff --git a/example/todomvc/router_options.html b/example/todomvc/router_options.html
index b5fd6547da705c7f2abff6cdc1855431a88d2609..c6c8afd6ce99553ce652f147acbcf1ab0852c334 100644
--- a/example/todomvc/router_options.html
+++ b/example/todomvc/router_options.html
@@ -11,6 +11,7 @@ BSD-style license that can be found in the LICENSE file.
<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
@@ -29,9 +30,7 @@ BSD-style license that can be found in the LICENSE file.
var anchors = this.queryAll('a');
- // TODO(jmesserly): this only works because main() registered for
- // popState and hashChanged.
- _stopWatcher = watchAndInvoke(() => window.location.hash, (e) {
+ _stopWatcher = watchAndInvoke(() => locationHash, (e) {
var hash = e.newValue;
if (hash == '') hash = '#/';
for (var a in anchors) {
« no previous file with comments | « example/todomvc/model.dart ('k') | lib/observe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698