Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Firebase variable that can be accessed globally

$
0
0

I'm not sure if I do this the right way or not (I'd be interested to know) but I have a config.js file named:

providers/config.js

In there I export some constants e.g

export let URL_GOOGLE = "https://www.google.co.uk";
export let URL_BBC = "https://www.bbc.co.uk";

and then in any components I want to use them I do:

import {URL_GOOGLE} from '../providers/config';

and then just use that value in the component.

As I said, I have no idea is this is best practice or not?


Viewing all articles
Browse latest Browse all 228595

Trending Articles



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