Getting the error: "Doesn't have an exported member of AngularFire, AuthProviders, AUthMethods, FirebaseListObservable" in AngularFire2?

I am new to Angular 4, so I create a firebase chat application with Angular 4, and then when I import some modules as follows:

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

I get an error for each module that says

Missing exported item AngularFire, AuthProviders, AUthMethods, FirebaseListObservable.

thanks

+11
source share
3 answers

BEFORE DATE (version 5.0.0-rc3):

, API . , FirebaseListObservable (. @Ashish Jha):

import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database-deprecated';

API, AngularFire 5.0 API Realtime. .


: AngularFire2 4.0.0 +.

, auth of angleularfire2, . :

import {AngularFireModule} from 'angularfire2';
// for auth    
import {AngularFireAuthModule} from 'angularfire2/auth';
// for database
import {AngularFireDatabaseModule} from 'angularfire2/database';

Auth Observable (AuthMethods AngularFireAuth):

// for auth
import { AngularFireAuth } from 'angularfire2/auth';
// for database
import { AngularFireDatabase } from 'angular2/database';
// for Observables
import {FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';
+18

, , ,

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

import { AngularFireAuth } from 'angularfire2/auth';

import { AngularFireDatabase, FirebaseListObservable } from "angularfire2/database-deprecated";

https://github.com/angular/angularfire2/blob/master/CHANGELOG.md

+8

AngularFireObject FirebaseObjectObservable AngularFireList FirebaseListObservable, AngularFire5

https://github.com/angular/angularfire2/blob/master/docs/version-5-upgrade.md

0

Source: https://habr.com/ru/post/1017278/


All Articles