Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Oct 28, 2019
1 parent e6a27c2 commit b9173e8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/plugins/feature_catalogue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
Replaces the legacy `ui/registry/feature_catalogue` module for registering "features" that should be showed in the home
page's feature catalogue. This should not be confused with the "feature" plugin for registering features used to derive
UI capabilities for feature controls.

## Example registration

```ts
// For legacy plugins
import { npSetup } from 'ui/new_platform';
npSetup.plugins.feature_catalogue.register(/* same details here */);

// For new plugins: first add 'feature_catalogue` to the list of `optionalPlugins`
// in your kibana.json file. Then access the plugin directly in `setup`:

class MyPlugin {
setup(core, plugins) {
if (plugins.feature_catalogue) {
plugins.feature_catalogue.register(/* same details here. */);
}
}
}
```

Note that the old module supported providing a Angular DI function to receive Angular dependencies. This is no longer supported as we migrate away from Angular and will be removed in 8.0.

0 comments on commit b9173e8

Please sign in to comment.