Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <script type="text/x-handlebars" data-template-name="index">
1st instance of multi-select component:
{{multi-select}}
<hr />
2nd instance of multi-select
{{multi-select}}
  </script>
  
  <script type="text/x-handlebars" data-template-name="components/multi-select">
  <ul>
  {{#each item in selectedItems}}
    <li>{{item}}</li>
  {{/each}}
  </ul>
  
  <button {{action "addItem"}}>Add Item</button>
  </script>
</body>
</html>
 
body {
  font-family: Helvetica, Arial, sans-serif;
}
 
App = Ember.Application.create();
App.MultiSelectComponent = Em.Component.extend({
  selectedItems: Em.A([]),
  actions: {
    addItem: function() {
      this.get('selectedItems').pushObject(Math.random());
    }
  }
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers