简体   繁体   English

在HTMLBars或Handlebars中是否有ruby的.send?

[英]Is there anything like ruby's .send in HTMLBars or Handlebars?

Was wondering if there's anything like ruby's .send for htmlbars. 想知道是否有像ruby的.send这样的htmlbars。 Been trying to search for it, but can't seem to find a proper answer. 一直在尝试搜索它,但似乎找不到正确的答案。 Here's what I want to do: 这是我想做的:

{{"name-of-helper" arguments}}

As simple as this. 就这么简单。 Is there any trick under it to achieve this effect? 有什么技巧可以达到这种效果?

There is no built-in one or supplemented one but if you need it you can write one for yourself . 没有内置的或补充的,但如果需要,您可以自己编写一个

Ember includes "component" helper which allows you to dynamically build component - it's not exactly the same, but might suit your needs. Ember包含“组件”帮助程序 ,它使您可以动态地构建组件-它并不完全相同,但可能满足您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM