I'm trying to bind a Ember.TextField's value to a property in it's parent view.
This code worked prior to upgrading to the latest version of ember. I've read about the new view scoping but can't figure out if/how that applies here.
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've tried "parentView.theValue" and "view.parentView.theValue"
I know I can give the TextField a viewName and bind to that from inside MyView but I want to know why the previous method stopped working.
Update: