mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 09:55:21 +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>); ``` |
||
---|---|---|
.. | ||
admin | ||
bootstrap-json | ||
confirm-new-email | ||
deprecation-silencer | ||
dialog-holder | ||
discourse | ||
discourse-common | ||
discourse-hbr | ||
discourse-plugins | ||
discourse-widget-hbs | ||
docs | ||
ember-addons | ||
ember-cli-progress-ci | ||
ember-production-deprecations | ||
float-kit | ||
locales | ||
patches | ||
pretty-text | ||
select-kit | ||
theme-transpiler | ||
truth-helpers | ||
wizard | ||
.licensee.json | ||
.npmrc | ||
handlebars-shim.js | ||
package.json | ||
polyfills.js | ||
run-patch-package | ||
service-worker.js.erb | ||
yarn.lock |