mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 18:46:50 +08:00
c00fd3e17d
Until now, plugins/themes had to follow very specific directory structures to set up plugin outlet connectors. This commit introduces a new `api.renderInOutlet` API which makes things much more flexible. Any Ember component definition can be passed to this API, and will then be rendered into the named outlet. For example: ```javascript import MyComponent from "discourse/plugins/my-plugin/components/my-component"; api.renderInOutlet('user-profile-primary', MyComponent); ``` When using this API alongside the gjs file format, components can be defined inline like ```javascript api.renderInOutlet('user-profile-primary', <template>Hello world</template>); ``` |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |