ember.js - EmberJS 1.13.3 / Component / Block template / access component property -


i'm using ember 1.13.3 (latest 1 of 2015-07-16).

i have component defined way:

import ember 'ember';  export default ember.component.extend({   tagname: 'li',   yow: 'argh', }); 

it's corresponding hbs simple (the default):

{{yield}} 

i use component way (in application.hbs):

{{#side-menuitem name='medium' current=selectedmenuitem clicked='menuitemselected'}}   {{#link-to name}}hey ... {{yow}}{{/link-to}} {{/side-menuitem}} 

i'm expectint see link label: hey ... argh. get: hey ... (without argh).

there's similar thread here: accessing component scope within template block

i tried also: {{view.yow}} , {{component.yow}}, no luck. looks ember 1.13 (still) has behavior: block format drops out of component scope , parent scope, there isn't available link parent scope component due isolation level.

this undesirable..., , somehow thought behavior has been changed in 1.13 (toward compatibility 2.0), i'm not seeing (or thought wrong?).

how around without messing (parent) controller?

thanks, raka

this should work, change templates to:

// application.hbs {{#side-menuitem name='medium' current=selectedmenuitem clicked='menuitemselected' |yow|}}   {{#link-to name}}hey ... {{yow}}{{/link-to}} {{/side-menuitem}}  // component.hbs {{yield yow}} 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -