Tell me more ×  I have the following example (see below) to work
with Ember.js, and everything works alright as far as I enter
something in the textfield and press enter. But how can I have
the same result when I press the button? How can I bind the
value of the textfield when clicking the button? Do I have work
with a view? Thanks in advance!  <script
type="text/x-handlebars">   {{view App.TextField}}   {{#view
Ember.Button target="App.peopleController" action="addPerson"}}
Add Person   <ul id='todo-list'>   {{#each App.peopleController
}}   App = Em.Application.create();    App.peopleController =
Em.ArrayController.create({     content: [{name: "Tom"}, {name:
"Mike"}],      addPerson: function(name) {
this.unshiftObject(App.Person.create({name: name}));
App.Person = Em.Object.extend({     name: null    App.TextField
= Em.TextField.extend({     insertNewline: function() {
this.set("value", ""); share|improve this question add comment
2 Answers  up vote 2 down vote accepted  This is actual