Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<title>Ember</title>
<!-- CE polyfill -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/document-register-element/0.2.1/document-register-element.js"></script>
<!-- custom element: hello-el -->
<script src="http://jsbin.com/kafumo/1.js"></script>
<link rel="stylesheet" href="http://jsbin.com/kafumo.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.9.1/ember.prod.js"></script>
<script type="text/x-handlebars" data-template-name='application'>
<h1>Ember</h1>
<h2>Custom Elements</h2>
{{#each item in itemList}}
  <hello-el {{bind-attr data-text=item.value}}></hello-el>
{{/each}}
<h2>Plain List</h2>
<ul>
{{#each item in itemList}}
  <li>{{item.value}}</li>
{{/each}}
</ul>
</script>
 
var App = Ember.Application.create();
App.ApplicationController = Ember.Controller.extend({
    itemList: [
        {value: 'Yehuda'},
        {value: 'Tom'}
    ]
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x