Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
  <script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.1/ember.js"></script>
</head>
<body>
  
  <script type="text/x-handlebars" data-template-name="application">
  
  <h1>Railscast Ember App</h1>
  <a href="http://railscasts.com/episodes/408-ember-part-1?view=comments" target="_blank">See here</a>
  
  <p>Note: this is an anti-pattern approach to writing an Ember app, as it should be considered an anti-pattern way of writing any JS MVC app, since everything is just thrown into one giant file. Ember's loaded with many scalable conventions that don't shine in the context of a simple demo/toy app. When your app starts to scale, you'll definitely want to split concerns into different templates/controllers/routes, but in the meantime, here's an example of how to write an Ember app with a single HTML/JS/CSS file. </p>
  
  {{view Ember.TextField valueBinding="newEntry" action="addEntry"}}
  <ul>
  {{#each entries}}
    <li>
      {{name}}
      {{#if winner}}<span {{bindAttr class="winner highlight"}}>WINNER</span>{{/if}}
    </li>
  {{/each}}
   </ul>
   <button {{action drawWinner}}>Draw Winner</button>
</script>
</body>
</html>
Output 300px

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

Dismiss x
public
Bin info
machtypro
0viewers