### File

`projects/commons/src/lib/core/http-client/http-client.module.ts`

### Providers

- HttpClientRequestService

### Imports

- ToastModule

### Methods

Static forConfig
`forConfig(environment)`
Defined in projects/commons/src/lib/core/http-client/http-client.module.ts:24
Parameters :
Name | Optional
environment | No
Returns : `ModuleWithProviders`

    import { ModuleWithProviders, NgModule } from '@angular/core';
    import { HTTP_INTERCEPTORS, HttpClientModule as HttpModule } from '@angular/common/http';

    import { ToastModule } from '../../elements';
    import { HttpClientRequestService } from './services';

    @NgModule({
        imports: [
            ToastModule,
        ],
        providers: [
            {
                provide: HTTP_INTERCEPTORS,
                useClass: HttpClientRequestService,
                multi: true,
            }
        ],
        exports: [
            HttpModule,
        ]
    })

    export class HttpClientModule {
        public static forConfig(environment): ModuleWithProviders {
            return {
                ngModule: HttpClientModule,
                providers: [
                    {
                        provide: 'Environment',
                        useValue: environment,
                    },
                ],
            };
        }
    }

# result-matching ""

# No results matching ""