KYPO Sandbox API
This library contains Angular API services of backend KYPO Sandbox service. It contains default implementation and mapping from DTOs to internal frontend model imported from kypo-sandbox-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-sandbox-api in your application, follow these steps:
- Run
npm install @muni-kypo-crp/sandbox-api
- Install peer dependencies
- Create an instance of
KypoSandboxConfig
- Import
KypoSandboxApiModule
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 MySandboxDefinitionApi extends SandboxDefinitionApi {
...
}
and provide your implementation in the module
@NgModule({
imports: [
...
],
providers: [
{ provide: SandboxDefinitionApi, useClass: MySandboxDefinitionApi }
]
})
export class MyModule {
}