Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add binding to own helper #19

Open
Owlbertz opened this issue Oct 9, 2018 · 0 comments
Open

How to add binding to own helper #19

Owlbertz opened this issue Oct 9, 2018 · 0 comments

Comments

@Owlbertz
Copy link

Owlbertz commented Oct 9, 2018

Hi,

I have several own helpers that need to be bound like so:

{{#if 'selectedComponent' bind=true}}
    {{#bind 'selectedComponent.name'}}
        {{getPropertyTranslation selectedComponent.name}}
    {{/bind}}
{{/if}}

So basically if the component is set, I want to display the result of the getPropertyTranslation helper, which gets the component name passed as a parameter. The thing is, name is an object and this causes the binding to not work.
It does work if I use the following:

    {{#bind 'selectedComponent.name.en'}}

However, I cannot simply access .en or any other key as I do not know what keys exist.

What I need is #bind to respond to the value of my getPropertyTranslation helper I guess, like so:

{{getPropertyTranslation selectedComponent.name bind=true}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant