Access Ember's view in # with assistant

I see strange behavior when I try to access view elements from the #with helper. This may be expected, but looking through the changelog for recent versions of Ember, I find nothing that I expect to cause this behavior.

Here is my toy pattern:

{{#with model as "bar"}}
  <label {{bind-attr for="view.inputField.elementId"}}>My Label</label><br/>
  {{input type="text" viewName="inputField" valueBinding="bar"}}<br/><br/>
  The id for the input field is {{view.inputField.elementId}}
{{/with}}

For Ember 1.6.1, the input field identifier is correctly displayed, and the label for the attribute is set correctly.

For Ember 1.7.1, rendering fails because "Unsuccessful error: statement failed: cannot get get with" inputField.elementId "on an undefined object"

For Ember 1.8.1, the page is displayed, but the input field identifier is not displayed, and the label for the attribute is not set.

For Ember 1.9.0-beta.1, we returned to the behavior in Ember 1.6.1.

jsbins ember:
Ember 1.6.1 - http://jsbin.com/lozape/4/edit
Ember 1.7.1 - http://jsbin.com/xicove/1/edit
( SO no, jsbins , )

? 1,7 1,8 , 1,9? , 1.8?

+4
1

, : valueBinding="bar" - . value=bar value bar.

, https://github.com/emberjs/ember.js/issues/5348.
, 1.9, , , .

for, :

{#with model as "bar"}}
  <label>My Label
    {{input type="text" viewName="inputField" value=bar}}<br/><br/>
  </label><br/>
{{/with}}

{{with}}.

0

All Articles