### File

`projects/commons/src/lib/elements/social-login/social-login.module.ts`

### Declarations

- SocialLoginComponent

### Providers

- SocialLoginService

### Exports

- SocialLoginComponent

### Methods

Static forConfig
`forConfig(config: ISocialLoginConfig)`
Defined in projects/commons/src/lib/elements/social-login/social-login.module.ts:27
Parameters :
Name | Type | Optional
config | `ISocialLoginConfig` | No
Returns : `ModuleWithProviders`

    import { CommonModule } from '@angular/common';
    import { ModuleWithProviders, NgModule } from '@angular/core';
    import { SocialLoginModule as SocialModule, AuthServiceConfig } from 'angularx-social-login';

    import { ApiKeyProvider } from './constants';
    import { SocialLoginService } from './services';
    import { ISocialLoginConfig } from './interfaces';
    import { SocialLoginComponent } from './components';

    @NgModule({
        imports: [
            CommonModule,
            SocialModule,
        ],
        declarations: [
            SocialLoginComponent,
        ],
        providers: [
            SocialLoginService,
        ],
        exports: [
            SocialLoginComponent,
        ],
    })

    export class SocialLoginModule {
        public static forConfig(config: ISocialLoginConfig): ModuleWithProviders {
            return {
                ngModule: SocialLoginModule,
                providers: [
                    SocialLoginService,
                    {
                        provide: AuthServiceConfig,
                        useFactory: ApiKeyProvider(config),
                    },
                    {
                        provide: 'SocialConfig',
                        useValue: config,
                    }
                ],
            };
        }
    }

# result-matching ""

# No results matching ""