| OLD | NEW |
| 1 #!mojo mojo:sky_viewer | |
| 2 <!-- | 1 <!-- |
| 3 // Copyright 2015 The Chromium Authors. All rights reserved. | 2 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 5 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 6 --> | 5 --> |
| 7 <sky> | |
| 8 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> | 6 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
| 9 <import src="example-scaffold.sky" /> | |
| 10 | 7 |
| 11 <sky-element name="example-app"> | 8 <sky-element name="color-sample" attributes="color:string"> |
| 12 <template> | 9 <template> |
| 13 <example-scaffold> | 10 <style> |
| 14 <div class="title">Awesome app</div> | 11 :host { |
| 15 <div class="menu">This is a menu</div> | 12 background-color: {{ color }}; |
| 16 <div class="body">This is an awesome app.</div> | 13 } |
| 17 </example-scrollable> | 14 </style> |
| 18 </template> | 15 </template> |
| 19 <script> | 16 <script> |
| 20 module.exports = class extends SkyElement { | 17 module.exports = class extends SkyElement { |
| 18 created() { |
| 19 this.color = "blue"; // "#FFFFFF"; |
| 20 } |
| 21 }.register(); | 21 }.register(); |
| 22 </script> | 22 </script> |
| 23 </sky-element> | 23 </sky-element> |
| 24 | |
| 25 <example-app /> | |
| 26 </sky> | |
| OLD | NEW |