Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Ember - Starter" />
<meta charset=utf-8 />
<title>Ember Starter</title>
  <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
  <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  <script src="http://builds.emberjs.com/handlebars-1.0.0-rc.4.js"></script>
  <script src="http://builds.emberjs.com/ember-1.0.0-rc.5.js"></script>
</head>
<body>
  <script type="text/x-handlebars" data-template-name="index">
    {{#each item in model}}
      {{formatNumber item.price}}
    {{/each}}
  </script>
</body>
</html>
  
 
App = Ember.Application.create({
  ready: function() {
    console.log('App ready');
  }
});
App.IndexRoute = Ember.Route.extend({
  model: function() {
    return [
      Ember.Object.create({price: 12.1234}),
      Ember.Object.create({price: 34.5678}),
      Ember.Object.create({price: 56.7890})
    ];
  }
});
Ember.Handlebars.registerBoundHelper('formatNumber', function(value) {
  return "$" + value.toFixed(2);
});
Output

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

Dismiss x
public
Bin info
alex.daquinopro
0viewers