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-1.9.1.js"></script>
  <script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
  <script src="http://builds.emberjs.com/ember-latest.js"></script>
<meta charset=utf-8 />
<title>Emptyview for collection view error</title>
</head>
<body>
  
  <script type="text/x-handlebars">
    <h2>Welcome to Ember.js</h2>
    {{outlet}}
  </script>
  <script type="text/x-handlebars" data-template-name="index">
     <ul>
    {{#each controller  itemController = 'listitem'}}
      <li>
      {{content}}
      <button {{action alertthis}}>Click</button>
      </li>
    {{/each}}
    </ul>
  </script>
 
</body>
</html>
 
App = Ember.Application.create();
App.Router.map(function() {
  // put your routes here
});
App.IndexRoute = Ember.Route.extend({
  model: function() {
    return ['red', 'yellow', 'blue'];
    }
});
App.IndexController = Ember.ArrayController.extend({
    alertthi: function(obj) {
        alert(obj);
    },
});
App.ListitemController = Ember.ObjectController.extend({
        alertthis: function() {
        this.send('alertthi',this.get('content'))
    },
})
Output

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

Dismiss x
public
Bin info
hyderalipro
0viewers