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

Unified Diff: samples/third_party/todomvc_performance/web/lib-elements/simple_router.dart

Issue 1576153002: Remove the Dromaeo and TodoMVC samples. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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_performance/web/lib-elements/simple_router.dart
diff --git a/samples/third_party/todomvc_performance/web/lib-elements/simple_router.dart b/samples/third_party/todomvc_performance/web/lib-elements/simple_router.dart
deleted file mode 100644
index 1337a262f6f04b5dedd65b7d8b9c9d44d739dc0c..0000000000000000000000000000000000000000
--- a/samples/third_party/todomvc_performance/web/lib-elements/simple_router.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Polymer Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-library todomvc.web.lib_elements.simple_router;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-
-// A very simple router for TodoMVC. Real app should use package:route, but it
-// does not currently support Shadow DOM.
-@CustomTag('simple-router')
-class SimpleRouter extends PolymerElement {
- @published String route = '';
-
- StreamSubscription _sub;
-
- factory SimpleRouter() => new Element.tag('simple-router');
- SimpleRouter.created() : super.created();
-
- attached() {
- super.attached();
- _sub = windowLocation.changes.listen((_) {
- var hash = window.location.hash;
- if (hash.startsWith('#/')) hash = hash.substring(2);
- // TODO(jmesserly): empty string is not triggering a call to TodoList
- // routeChanged after deployment. Use 'all' as a workaround.
- if (hash == '') hash = 'all';
- route = hash;
- });
- }
-
- detached() {
- super.detached();
- _sub.cancel();
- }
-
- routeChanged() {
- fire('route', detail: route);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698