source: src/mapservice-webclient/src-gen/gnuboat-mapservice/api.module.ts@ 5a6ece9

debian/bullseye
Last change on this file since 5a6ece9 was d660d75, checked in by Joachim Langenbach <joachim.langenbach@…>, 6 years ago

Added all generated code to the soruce tree, to avoid generation during package build time

  • Property mode set to 100644
File size: 1.3 KB
Line 
1import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
2import { Configuration } from './configuration';
3import { HttpClient } from '@angular/common/http';
4
5
6import { DevicesService } from './api/devices.service';
7import { LogsService } from './api/logs.service';
8import { TilesService } from './api/tiles.service';
9import { UsersService } from './api/users.service';
10import { WatersService } from './api/waters.service';
11
12@NgModule({
13 imports: [],
14 declarations: [],
15 exports: [],
16 providers: []
17})
18export class ApiModule {
19 public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
20 return {
21 ngModule: ApiModule,
22 providers: [ { provide: Configuration, useFactory: configurationFactory } ]
23 };
24 }
25
26 constructor( @Optional() @SkipSelf() parentModule: ApiModule,
27 @Optional() http: HttpClient) {
28 if (parentModule) {
29 throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
30 }
31 if (!http) {
32 throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
33 'See also https://github.com/angular/angular/issues/20575');
34 }
35 }
36}
Note: See TracBrowser for help on using the repository browser.