Search code examples
databaseangularfire

Angular Firebase and AngularFireDatabase


In the angular firebase, I came across following two things:

import { AngularFireDatabase } from 'angularfire2/database';
import firebase from 'firebase';

If both can be used for interacting with the database, what is the difference between them?


Solution

  • The first line imports the AngularFire2 library.

    The second line imports the Firebase JavaScript SDK, which is what AngularFire uses under the hood.