OLD | NEW |
1 <polymer-element name="x-news" extends="ul"> | 1 <polymer-element name="x-news" extends="ul"> |
2 <template> | 2 <template> |
3 <style scoped> | 3 <style scoped> |
4 div.breaking { | 4 div.breaking { |
5 color: Red; | 5 color: Red; |
6 font-size: 20px; | 6 font-size: 20px; |
7 border: 1px dashed Purple; | 7 border: 1px dashed Purple; |
8 } | 8 } |
9 div.other { | 9 div.other { |
10 padding: 2px 0 0 0; | 10 padding: 2px 0 0 0; |
11 border: 1px solid Cyan; | 11 border: 1px solid Cyan; |
12 } | 12 } |
13 </style> | 13 </style> |
14 <div class="breaking"> | 14 <div class="breaking"> |
15 <h2>Breaking Stories</h2> | 15 <h2>Breaking Stories</h2> |
16 <ul> | 16 <ul> |
17 <content select=".breaking"></content> | 17 <content select=".breaking"></content> |
18 </ul> | 18 </ul> |
19 </div> | 19 </div> |
20 <div class="other"> | 20 <div class="other"> |
21 <h2>Other News</h2> | 21 <h2>Other News</h2> |
22 <ul> | 22 <ul> |
23 <content></content> | 23 <content></content> |
24 </ul> | 24 </ul> |
25 </div> | 25 </div> |
26 </template> | 26 </template> |
27 <script type="application/dart"> | 27 <script type="application/dart;component=1"> |
28 import 'dart:html'; | 28 import 'dart:html'; |
29 import 'package:polymer/polymer.dart'; | 29 import 'package:polymer/polymer.dart'; |
30 | 30 |
31 class XNews extends UListElement with Polymer { | 31 class XNews extends UListElement with Polymer { |
32 XNews.created() : super.created() { | 32 XNews.created() : super.created() { |
33 polymerCreated(); | 33 polymerCreated(); |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 @initMethod | 37 @initMethod |
38 _init() { | 38 _init() { |
39 Polymer.register('x-news', XNews); | 39 Polymer.register('x-news', XNews); |
40 } | 40 } |
41 </script> | 41 </script> |
42 </polymer-element> | 42 </polymer-element> |
OLD | NEW |