KYPO Training API
This library contains Angular API services of backend KYPO Training service. It contains default implementation and mapping from DTOs to internal frontend model imported from kypo-training-model. You can override existing services by implementing the related abstract class and provide it in module.
Prerequisites
- NPM with access to KYPO registry
Usage
To use kypo-training-api in your application, follow these steps:
- Run
npm install @muni-kypo-crp/training-api
- Install peer dependencies
- Create an instance of
KypoTrainingApiConfig
- Import
KypoTrainingApiModule
with config passed toforRoot()
method
This will provide all API services with default implementation. If you want to override the default implementation, extend an API service
@Injectable()
export class MyTrainingDefinitionApi extends TrainingDefinitionApi {
...
}
and provide your implementation in the module
@NgModule({
imports: [
...
],
providers: [
{ provide: TrainingDefinitionApi, useClass: MyTrainingDefinitionApi }
]
})
export class MyModule {
}