diff --git a/docs/app/components/snippets/installation-2.js.txt b/docs/app/components/snippets/installation-2.js.txt new file mode 100644 index 00000000..560a8e0b --- /dev/null +++ b/docs/app/components/snippets/installation-2.js.txt @@ -0,0 +1,13 @@ +import config from './config/environment'; // this line should already be present +import { setConfig } from 'ember-basic-dropdown/config'; + +// Basic usage: +setConfig({ + rootElement: config.APP.rootElement, // Default is 'body' (or '#ember-testing' in tests) +}); + +// Advanced: If you need to override globally the destination element ID (BasicDropdownWormhole), you can do: +setConfig({ + destination: 'my-custom-destination-id', + rootElement: config.APP.rootElement, // Default is 'body' (or '#ember-testing' in tests) +}); diff --git a/docs/app/templates/public-pages/docs/installation.gts b/docs/app/templates/public-pages/docs/installation.gts index 48e1f44f..83a55b49 100644 --- a/docs/app/templates/public-pages/docs/installation.gts +++ b/docs/app/templates/public-pages/docs/installation.gts @@ -5,30 +5,31 @@ import { LinkTo } from '@ember/routing';
- Ember-basic-dropdown is distributed as an - Ember CLI - addon. To install it, run the following command in your ember project - directory + To install ember-basic-dropdown, run the following command in your ember + project directory
$ ember install ember-basic-dropdown+
$ pnpm install ember-basic-dropdown
- When installing this through
- ember install
- the addon will add the necessary snippet above automatically in your app.
+ After the installation you need to add the following lines somewhere in your
+ app.js/ts.
- After the installation you need to add the following lines somewhere in your
- templates where you want to render the dropdown content into e.g. your
- application.hbs. In this component will be rendered the
+ Then you need to add the following lines somewhere in your templates where
+ you want to render the dropdown content into e.g. your
+ application.gjs/gts. In this component will be rendered the
dropdown content.