2017-08-09 24 views
4

後「NG服務」或「故宮啓動」我得到下面的錯誤與參考替換函數或lambda,調用函數SocialLoginModule,函數調用不supported.Consider

enter image description here

保存後任何來自工作空間的文件,它編譯所有項目文件,這次它運行良好。 我不明白爲什麼會發生這種情況。你能請別人幫我解決這個問題嗎?請在下面找到相同的圖片。在該文件中

SocialLoginModule 

更新供應商是::

enter image description here

Please find below app.module.ts file 

    import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { FormsModule } from '@angular/forms'; 
import { HttpModule } from '@angular/http'; 
import { RouterModule } from '@angular/router'; 
import { SocialLoginModule, AuthServiceConfig, GoogleLoginProvider, FacebookLoginProvider } from "angular4-social-login"; 
import { StarRatingModule } from 'angular-star-rating'; 
import { AppComponent } from './app.component'; 
import { LandingPageComponent } from './landing-page/landing-page.component'; 
import { AppHeaderComponent } from './app-header/app-header.component'; 
let config = new AuthServiceConfig([ 
    { 
    id: GoogleLoginProvider.PROVIDER_ID, 
    provider: new GoogleLoginProvider("") 
    }, 
    { 
    id: FacebookLoginProvider.PROVIDER_ID, 
    provider: new FacebookLoginProvider("") 
    } 
]); 
export function provideConfig() { 
    return config; 
} 
@NgModule({ 
    declarations: [ 
    AppComponent, 
    LandingPageComponent, 
    AppHeaderComponent 
    ], 
    imports: [ 
    BrowserModule, 
    FormsModule, 
    HttpModule, 
    StarRatingModule.forRoot(), 
    RouterModule.forRoot([ 
     { path: 'landing', component: LandingPageComponent }, 
     { path: '', redirectTo: 'landing', pathMatch: 'full' } 
    ]), 
    SocialLoginModule.initialize(config) 
    ], 
    providers: [{ 
    provide: AuthServiceConfig, 
    useFactory: provideConfig 
    }], 
    bootstrap: [AppComponent] 
}) 
export class AppModule { } 

回答