如何挂载Widget参数

您好!我正在尝试在一个原始的 hbs 模板中挂载一个小部件

<MountWidget @widget="header-notifications" @args={{this.currentUser}} />

但是出现了一个错误。我认为这是因为我添加的参数不正确,但我不知道如何正确添加,您能帮我看看如何添加才能让小部件正常工作吗?

1 个赞

照此操作

<MountWidget @widget="header-notifications" @args={{hash user=this.currentUser}}/>
1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.