Honestly i didn't find much helpful guides on emberjs.com about valueBindings.
//login_route.js
App.LoginRoute = Ember.Route.extend({
model: function() {
return Ember.Object.create();
}
});
Basically here i'm creating empty JS object to be model for login template.
//login.hbs
...
{{view Em.TextField valueBinding="email" id="email"}}
{{view Ember.TextField valueBinding="password" type="password" id="password"}}
...
So when user start to type user&pass, behind the scenes, Ember will crate 2 properties named "email" and "password" and 'append' them to context(model) of the current template and properties will be constantly updated till user hit login button ?
I can guess that is correct because i can do simple debug inside template:
{{ email }} (which is equal to {{ controller.email }} which again is equal to {{ controller.model.email }})?