如何使用插件 API 将属性传递到 Handlebars 模板?
我试图根据当前主题是否公开来显示不同的文本。我正在使用 topic-above-post-stream 连接器出口。
我尝试扩展 api.modifyClass("component:topic-category", {}) 并在 init() 方法中设置属性,它会在控制台中显示,但实际上并未显示在 this 中。
如何使用插件 API 将属性传递到 Handlebars 模板?
我试图根据当前主题是否公开来显示不同的文本。我正在使用 topic-above-post-stream 连接器出口。
我尝试扩展 api.modifyClass("component:topic-category", {}) 并在 init() 方法中设置属性,它会在控制台中显示,但实际上并未显示在 this 中。
ah, 根据这个找到了:Adding a form to a plugin - #3 by Johani
不得不使用 setupComponent()