Last active
April 1, 2016 10:30
-
-
Save ckimrie/29c1b2594dc8fb3a706a00b490b3a798 to your computer and use it in GitHub Desktop.
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="https://www.polymer-project.org/1.0/components/polymer/polymer.html"> | |
<link rel="import" href="https://gist.githubusercontent.com/ckimrie/22718bfead15b8903b9f7a616342d19f/raw/cedbff08823c585c7d2eebd8ef94d1b204438a50/component.html"> | |
<dom-module id="component-2"> | |
<template> | |
<style include="component-1"> | |
:host { | |
display: block; | |
} | |
</style> | |
<div id="target"></div> | |
</template> | |
<script> | |
(function() { | |
'use strict'; | |
Polymer({ | |
is: 'component-2', | |
properties: { | |
foo: { | |
type: String, | |
value: 'component-2', | |
notify: true | |
} | |
}, | |
ready: function(){ | |
var el = document.createElement('div'); | |
el.className = 'red-box'; | |
el.textContent = 'Hello'; | |
this.$.target.appendChild(el); | |
} | |
}); | |
})(); | |
</script> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment