I am trying to bind Ember.TextField valueto a property in the parent view. This code worked before upgrading to the latest version of ember. I read about a new field of view, but I canβt understand if it is applicable here / how it is.
Template my-template:
Input: {{view Ember.TextField valueBinding="theValue" }}
View:
App.MyView = Em.View.extend({
templateName: 'my-template',
theValue: null,
init: function(){
this._super();
this.set('theValue','');
},
keyDown: function(e){
if(e.keyCode === 13){
alert(this.get('theValue'));
}
}
});β
jsFiddle: demo
I tried "parentView.theValue"and"view.parentView.theValue"
I know that I can give TextFielda viewNameand bind to it internally MyView, but I want to know why the previous method stops working.
Update:
source
share