Skip to content

Instantly share code, notes, and snippets.

@polds
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save polds/8419eb2cdfe024b287e4 to your computer and use it in GitHub Desktop.

Select an option

Save polds/8419eb2cdfe024b287e4 to your computer and use it in GitHub Desktop.
Polymer 1.0 cross bind
...
<link rel="import" href="my-service.html">
</head>
<body>
<my-service my="{{output}}"></my-service>
<h3>[[output.my]]</h3>
</body>
</html>
<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