/
qwiklly
/
cms
Обзор
Документация
Войти
/
qwiklly
/
cms
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
apps/client/src/app/api-gen/api.module.ts
50 строк
1 KB
exstarzii
feat(#7): add usertype on client
07 авг 2023, 01:15
07 авг 2023, 01:15
bef0e60
Код
Авторство
О чём код?
/* tslint:disable */ /* eslint-disable */ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ApiConfiguration, ApiConfigurationParams } from './api-configuration'; import { AuthService } from './services/auth.service'; import { JsonFileService } from './services/json-file.service'; import { UserTypeService } from './services/user-type.service'; /** * Module that provides all services and configuration. */ @NgModule({ imports: [], exports: [], declarations: [], providers: [ AuthService, JsonFileService, UserTypeService, ApiConfiguration ], }) export class ApiModule { static forRoot(params: ApiConfigurationParams): ModuleWithProviders<ApiModule> { return { ngModule: ApiModule, providers: [ { provide: ApiConfiguration, useValue: params } ] } } constructor( @Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient ) { if (parentModule) { throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); } if (!http) { throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575'); } } }