Last active
August 29, 2015 14:23
-
-
Save polds/8419eb2cdfe024b287e4 to your computer and use it in GitHub Desktop.
Polymer 1.0 cross bind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| <link rel="import" href="my-service.html"> | |
| </head> | |
| <body> | |
| <my-service my="{{output}}"></my-service> | |
| <h3>[[output.my]]</h3> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="bower_components/polymer/polymer.html"> | |
| <dom-module id="my-service"> | |
| <style> | |
| :host { | |
| display: none; | |
| } | |
| </style> | |
| <template> | |
| </template> | |
| <script> | |
| Polymer({ | |
| is: 'my-service', | |
| ready: function() { | |
| this.my = { | |
| my: "Loading...", | |
| }; | |
| }, | |
| properties: { | |
| my: { | |
| type: Object, | |
| reflectToAttribute: true, | |
| notify: true | |
| } | |
| } | |
| }); | |
| </script> | |
| </dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment