mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06: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>); ``` |
||
---|---|---|
.. | ||
ADMIN-QUICK-START-GUIDE.md | ||
AUTHORS.md | ||
CHANGELOG-JAVASCRIPT-PLUGIN-API.md | ||
code-of-conduct.md | ||
DEVELOPER-ADVANCED.md | ||
DEVELOPMENT-OSX-NATIVE.md | ||
INSTALL-cloud.md | ||
INSTALL-email.md | ||
INSTALL.md | ||
PLUGINS.md | ||
SECURITY.md | ||
TESTING.md | ||
TROUBLESHOOTING.md |