Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Firebase variable that can be accessed globally

$
0
0

@gigocabrera wrote:

In my ionic 1 app I had the following global variable in the app.js file

/* FIREBASE */
var fb = new Firebase("https://brilliant-inferno-1044.firebaseio.com");

From the factories.js I was able to reference it as follows: ref = fb.child("houses");

How can I do the same in ionic 2? Should it live in the constructor of the class for the app.js file in ionic2?

this.firebaseUrl = "https://brilliant-inferno-1044.firebaseio.com"; (maybe?)

Posts: 10

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>