Last active
August 29, 2015 14:15
-
-
Save danialgoodwin/d5197126bde464c62ac0 to your computer and use it in GitHub Desktop.
This file contains 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"> | |
<link rel="import" href="../bower_components/core-ajax/core-ajax.html"> | |
<polymer-element name="my-element" noscript> | |
<template> | |
<span>I'm <b>my-element</b>. This is my Shadow DOM.</span> | |
<core-ajax url="http://example.com/json" auto response="{{resp}}"></core-ajax> | |
<textarea value="{{resp}}"></textarea> | |
</template> | |
</polymer-element> |
This file contains 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"> | |
<polymer-element name="my-element" noscript> | |
<template> | |
<span>Hello from <b>my-element</b>. This is my Shadow DOM.</span> | |
</template> | |
</polymer-element> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- 1. Load platform support before any code that touches the DOM. --> | |
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script> | |
<!-- 2. Load the component using an HTML Import --> | |
<link rel="import" href="elements/my-element.html"> | |
</head> | |
<body> | |
<!-- 3. Declare the element by its tag. --> | |
<my-element></my-element> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment