Ember Latest
The latest build of Ember.
HTML
<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<script type="text/x-handlebars" data-template-name="application">
<h1>ember-latest jsfiddle</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="index">
<table class="table-history">
{{#collection App.GroupListView}}
<td class="col-left">
{{view.content}}
</td>
<td>
<div class="ph-img"></div>
</td>
<td>
<a href="#" {{action "editGroup" view.content target=view}}>
LINK
</a>
</td>
{{/collection}}
</table>
</script>
JavaScript
App = Ember.Application.create({});
App.GroupList = Ember.ArrayController.create({
content: ['A','B','C','D','E']
})
App.GroupListView = Ember.CollectionView.extend({
tagName: 'tbody',
contentBinding: "App.GroupList"
})
App.IndexView = Ember.View.extend({
actions: {
editGroup: function() {
alert("You Clicked - in View");
}
}
})
App.IndexController = Ember.Controller.extend({
actions: {
editGroup: function() {
alert("You Clicked - in Controller");
}
}
})