【发布时间】:2020-08-01 18:56:13
【问题描述】:
我有一个服务,在 config.serivce.ts 中称为 ConfigService,我需要获取一个返回值的函数 (getClientID) 并将该值导入模块文件:appAuth.module。 ts
我需要知道如何在这样的文件中从服务函数中注入一个值?
例如在我的 appAuth.module.ts 中:
@NgModule({
imports: [
CommonModule,
AuthModule.forRoot<any>({
adapter: getClientID(),
})],
providers: [],
declarations: []
})
export class AppAuthModule { }
【问题讨论】:
标签: angular angular8 angular-services angular-dependency-injection