/angularfire2/index has no exported member 'AngularFire'

后端 未结 3 738
悲&欢浪女
悲&欢浪女 2020-12-09 18:08

Can\'t fix this problem:

app.component.ts

import { AngularFire, AuthProviders, AuthMethods } from \'angularfire2\';

/angularfire2/index has no expor         


        
3条回答
  •  不知归路
    2020-12-09 18:35

    Since you are using angularfire2@4.0.0+, there is no AngularFire exported any more. Instead, you shall use it as below:

    // import AngularFireAuthModule at NgModule
    import { AngularFireAuthModule } from 'angularfire2/auth';
    
    
    import { AngularFireAuth } from 'angularfire2/auth';
    // inject 
    construstor(afa: AngularFireAuth) {
      afa.auth.signInWithPopup()
    }
    

提交回复
热议问题