forked from Polymer/old-docs-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Live example for auto-binding, plus a small fix for include_external
- Loading branch information
Arthur Evans
committed
Jun 4, 2014
1 parent
915f424
commit 0dc0157
Showing
4 changed files
with
45 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- <link rel="import" href="/elements/demo-tabs.html"> --> | ||
|
||
<demo-tabs selected="0" bottom> | ||
<demo-tab heading="index.html"> | ||
{% highlight html %} | ||
{% include_external samples/databinding/auto-binding.html doc-sample %} | ||
{% endhighlight %} | ||
</demo-tab> | ||
<div class="result"> | ||
{% include_external samples/databinding/auto-binding.html runnable-sample %} | ||
</div> | ||
</demo-tabs> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- [START runnable-sample] --> | ||
<head> | ||
<link rel="import" href="/components/polymer/polymer.html"> | ||
</head> | ||
<!-- [END runnable-sample] --> | ||
<!-- [START doc-sample] --> | ||
<body> | ||
<!-- [START runnable-sample] --> | ||
<!-- render data set --> | ||
<template id="auto-bind-demo" is="auto-binding" repeat="{{quotes}}"> | ||
<h3>{{quote}}</h3> | ||
- <em>{{attribution}}</em> | ||
</template> | ||
|
||
<script> | ||
var t = document.querySelector('#auto-bind-demo'); | ||
t.quotes = [{ | ||
attribution: "Plautus", | ||
quote: "Let deeds match words." | ||
}, { | ||
attribution: "Groucho Marx", | ||
quote: "Time flies like an arrow. Fruit flies like a banana." | ||
}]; | ||
t.addEventListener('template-bound', function() { | ||
console.log('Template data binding complete.'); | ||
}); | ||
</script> | ||
<!-- [END runnable-sample] --> | ||
</body> | ||
<!-- [END doc-sample] --> |