import { Injectable , EventEmitter } from '@angular/core' ; import { SettingsService , ModalHelper } from '@delon/theme' ; import { CoreService } from 'generated' ; import { HttpClient } from '@angular/common/http' ; @ Injectable ( ) export class ListContext { public onConfigReady : EventEmitter < any > = new EventEmitter ( ) ; public onEntriesLoaded : EventEmitter < any > = new EventEmitter ( ) ; constructor ( public client , public settings , public coreService , public modalHelper ) { } async init ( domain , params ? ) { const configUrl = `api/${ domain }/config` ; const config = await this . client . get ( configUrl , params ) . toPromise ( ) ; return config ; } async load ( ) { } async add ( ) { } async edit ( ) { } async remove ( ) { } async removeBatch ( ) { } }