如何在 ember.js v3.8 中渲染子组件?

how to render child component in ember.js v3.8?

在我使用 v2.15 之前,我可以通过

渲染子组件
{{component/child-component}}

但无法在 v3.8 上渲染子组件我该如何渲染子组件?

<Component />

嵌套组件在尖括号组件调用语法中调用,使用 :: 作为分隔符:

// Before
{{component/child-component}}

// After
<Component::ChildComponent />

您可以在相应的 RFC 中找到更多详细信息:Nested Invocations in Angle Bracket Syntax #457

Ember 3.10 之前的功能不支持本机。但是有一个 polyfill 使它在 Ember >= 2.12 中可用:ember-angle-bracket-invocation-polyfill