sample
Installation
Install SampleComponent using npm
;
$ [npm install | yarn add] sample
Basic Use
Configure and load SampleComponent in the application constructor as shown below.
import {SampleComponent, SampleComponentOptions, DEFAULT_SAMPLE_OPTIONS} from 'sample';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
constructor(options: ApplicationConfig = {}) {
const opts: SampleComponentOptions = DEFAULT_SAMPLE_OPTIONS;
this.configure(SampleComponentBindings.COMPONENT).to(opts);
// Put the configuration options here
});
this.component(SampleComponent);
// ...
}
// ...
}