abc1215d6c
>> call api 호출 후 응답값에 대한 처리가 필요함. 현재 응답이 느려서 500 에러 떨어짐.
25 lines
596 B
TypeScript
25 lines
596 B
TypeScript
import { NgModule, ModuleWithProviders } from '@angular/core';
|
|
|
|
import { _MODULE_CONFIG } from './config/token';
|
|
import { ModuleConfig } from './config/module-config';
|
|
|
|
import { CallService } from './services/call.service';
|
|
|
|
const SERVICES = [CallService];
|
|
|
|
@NgModule({
|
|
declarations: [],
|
|
imports: [],
|
|
exports: []
|
|
})
|
|
export class UCapPromptApiModule {
|
|
public static forRoot(
|
|
config: ModuleConfig
|
|
): ModuleWithProviders<UCapPromptApiModule> {
|
|
return {
|
|
ngModule: UCapPromptApiModule,
|
|
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
|
|
};
|
|
}
|
|
}
|