ember handlebars: find where component/helper/variable is defined

不羁的心 提交于 2019-12-08 06:56:45

问题


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}}.



来源:https://stackoverflow.com/questions/49390867/ember-handlebars-find-where-component-helper-variable-is-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!