import { BrowserModule } from '@angular/platform-browser'; import { HttpClientModule } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { GoogleLoginProvider, FacebookLoginProvider, AuthService } from 'angular-6-social-login'; import { SocialLoginModule, AuthServiceConfig } from 'angular-6-social-login'; import { LoginComponent } from './login/login.component'; import { DashboardComponent } from './dashboard/dashboard.component'; export function socialConfigs() { const config = new AuthServiceConfig( [ { id: FacebookLoginProvider.PROVIDER_ID, provider: new FacebookLoginProvider('appid') }, { id: GoogleLoginProvider.PROVIDER_ID, provider: new GoogleLoginProvider('appid') } ] ); return config; } @NgModule({ declarations: [ AppComponent, LoginComponent, DashboardComponent ], imports: [ BrowserModule, HttpClientModule, AppRoutingModule ], providers: [ AuthService, { provide: AuthServiceConfig, useFactory: socialConfigs } ], bootstrap: [AppComponent] }) export class AppModule { }
Hi I keep getting the following Error - Can't resolve all parameters for AuthService: (?) Im not too sure what I'm actually missing. I'm trying to follow this tutorial and nothing seems to be working https://www.c-sharpcorner.com/article/login-with-facebook-and-google-using-angular-8/ Any help will be much appreciated, I am new to angular 8/ -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/d6288861-98ea-4621-bc5a-5650f9c41229%40googlegroups.com.