无法解决此问题:
应用组件

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

/angularfire2/index has no exported member 'AngularFire',
/angularfire2/index has no exported member 'AuthProviders',
/angularfire2/index has no exported member 'AuthMethods '

但在app.module.ts中
import { AngularFireModule } from 'angularfire2';

运行良好,我可以初始化应用程序
包装袋
"angularfire2": "^4.0.0-rc.0",
"core-js": "^2.4.1",
"firebase": "^3.9.0",
...
"devDependencies": {...
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"

最佳答案

由于您使用的是[email protected]+,因此不再导出AngularFire。相反,您应按如下方式使用:

// import AngularFireAuthModule at NgModule
import { AngularFireAuthModule } from 'angularfire2/auth';


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

10-04 15:42