Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js 余烬把手:查找定义组件/辅助对象/变量的位置_Ember.js_Handlebars.js - Fatal编程技术网

Ember.js 余烬把手:查找定义组件/辅助对象/变量的位置

Ember.js 余烬把手:查找定义组件/辅助对象/变量的位置,ember.js,handlebars.js,Ember.js,Handlebars.js,给出一些把手代码如下: {{ui.select param1="foo" param2="bar"}} {{#my-component as |ui|}} {{ui.select ...}} {{/my-component}} 我如何找到定义了ui.select的位置 (我正好在Ember 2.13上)因为它包含一个来自上下文组件 因此,首先找出ui的来源。也许你有这样的想法: {{ui.select param1="foo" param2="bar"}} {{#my-componen

给出一些把手代码如下:

{{ui.select param1="foo" param2="bar"}}
{{#my-component as |ui|}}
  {{ui.select ...}}
{{/my-component}}
我如何找到定义了
ui.select的位置


(我正好在Ember 2.13上)

因为它包含一个
来自上下文组件

因此,首先找出
ui
的来源。也许你有这样的想法:

{{ui.select param1="foo" param2="bar"}}
{{#my-component as |ui|}}
  {{ui.select ...}}
{{/my-component}}

然后你必须检查
my component
并找出
ui
{yield}

中分配给了什么
。如果这真的是找到这些东西的最好方法,我会喜欢一些常用的正则表达式来为助手找到把手定义:搜索
.js
文件:
export default Ember.Helper
(旧语法)和
export default Helper(
(新语法)。对于组件,请按名称搜索
.hbs
文件。这就是诀窍!谢谢Lux。(编辑:转到新问题,稍后将链接)我在关于查找插件定义的帮助程序的问题中添加了第二部分,如果您愿意,我可以将其移至一个新问题,但我认为最好将问题集中一点。@ctcphere是第二个问题: