Ember.TextField valueBinding to parentView
ember.js, javascript
Solution
I've updated your jsFiddle to work: http://jsfiddle.net/U3thg/23/
I just changed your `valueBinding` to `"view.theValue"`.
{{view Ember.TextField valueBinding="view.theValue" }}
Problem
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: - Tom Dale's Explanation - Ember Source