余烬把手:查找在哪里定义了组件/帮助器/变量 [英] ember handlebars: find where component/helper/variable is defined
本文介绍了余烬把手:查找在哪里定义了组件/帮助器/变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
给出如下这样的车把代码:
Given some handlebars code like this:
{{ui.select param1="foo" param2="bar"}}
如何找出 ui.select $ c $的位置
How could I find out where ui.select
is defined?
(我碰巧是Ember 2.13)
(I happen to be on Ember 2.13)
推荐答案
因为它包含一个。
这来自上下文组件。
because this contains a .
this comes from a contextual component.
所以首先找出 ui
来自。可能您是这样的:
so first find out where ui
comes from. Probably you have something like this:
{{#my-component as |ui|}}
{{ui.select ...}}
{{/my-component}}
然后必须检查 my-component
并找出 {中的
。 ui
分配了什么{ {yield}}
Then you have to check the my-component
and find out what ui
is assigned to in the {{yield}}
.
这篇关于余烬把手:查找在哪里定义了组件/帮助器/变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文