ember 车把:找到 component/helper/variable 的定义位置
ember handlebars: find where component/helper/variable is defined
给定一些把手代码如下:
{{ui.select param1="foo" param2="bar"}}
我怎样才能找到 ui.select
的定义位置?
(我刚好在Ember 2.13)
因为它包含一个 .
这来自上下文组件。
所以先搞清楚ui
是从哪里来的。可能你有这样的事情:
{{#my-component as |ui|}}
{{ui.select ...}}
{{/my-component}}
然后你必须检查 my-component
并找出 ui
在 {{yield}}
中分配给了什么。
给定一些把手代码如下:
{{ui.select param1="foo" param2="bar"}}
我怎样才能找到 ui.select
的定义位置?
(我刚好在Ember 2.13)
因为它包含一个 .
这来自上下文组件。
所以先搞清楚ui
是从哪里来的。可能你有这样的事情:
{{#my-component as |ui|}}
{{ui.select ...}}
{{/my-component}}
然后你必须检查 my-component
并找出 ui
在 {{yield}}
中分配给了什么。