How read from Firebase Database


Hi! I’m trying to get data from Firebase DataBase.

I have the firebase.init.js file:

angular.module(‘firebaseConfig’, [‘firebase’])


var config = {
apiKey: “MyApiKey”,
authDomain: “MyDomain”,
databaseURL: “MyDatabaseURL”,
projectId: “MyProjectID”,
storageBucket: “”,
messagingSenderId: “MyNumbers”


NOTE: I have filled all the parameters with my database info.

I want use that database connection into a page, so the code in page is:

function ($scope, $stateParams, $firebaseArray) {
var ref = firebase.database().ref().child(“events”); // database is named events
$ = $firebaseArray(ref);

Is that database connection correct? How I read from that database config?






Hi @robinyo,

Thanks for the response.

I using the Ionic Creator, not CLI version. Is no way to use that in Creator version?