ember handlebars: find where component/helper/vari

2019-06-08 03:33发布

问题:

Given some handlebars code like this:

{{ui.select param1="foo" param2="bar"}}

How could I find out where ui.select is defined?

(I happen to be on Ember 2.13)

回答1:

because this contains a . this comes from a contextual component.

so first find out where ui comes from. Probably you have something like this:

{{#my-component as |ui|}}
  {{ui.select ...}}
{{/my-component}}

Then you have to check the my-component and find out what ui is assigned to in the {{yield}}.