OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
5 BSD-style license that can be found in the LICENSE file. | 5 BSD-style license that can be found in the LICENSE file. |
6 --> | 6 --> |
7 <html> | 7 <html> |
8 <body> | 8 <body> |
9 <element name="x-router-options" extends="ul" apply-author-styles> | 9 <element name="x-router-options" extends="ul" apply-author-styles> |
10 <template><content></content></template> | 10 <template><content></content></template> |
11 <script type="application/dart"> | 11 <script type="application/dart"> |
12 import 'dart:html'; | 12 import 'dart:html'; |
13 import 'package:web_components/web_components.dart'; | 13 import 'package:web_ui/web_ui.dart'; |
14 | 14 |
15 /** | 15 /** |
16 * Given a set of child links to this page, this will add the "selected" CSS | 16 * Given a set of child links to this page, this will add the "selected" CSS |
17 * class to the link that matches window.location.hash. | 17 * class to the link that matches window.location.hash. |
18 * | 18 * |
19 * For example, if the current window.location.hash is "#/completed" and we | 19 * For example, if the current window.location.hash is "#/completed" and we |
20 * have a tag like `<a href="#/completed">` it will get the class | 20 * have a tag like `<a href="#/completed">` it will get the class |
21 * `class="selected"`, and other links will have that CSS class removed. | 21 * `class="selected"`, and other links will have that CSS class removed. |
22 */ | 22 */ |
23 class RouterOptions extends WebComponent { | 23 class RouterOptions extends WebComponent { |
(...skipping 18 matching lines...) Expand all Loading... |
42 | 42 |
43 void removed() { | 43 void removed() { |
44 _stopWatcher(); | 44 _stopWatcher(); |
45 super.removed(); | 45 super.removed(); |
46 } | 46 } |
47 } | 47 } |
48 </script> | 48 </script> |
49 </element> | 49 </element> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |