If I modify the initializeApp
config object parameters via scripting how could I reinitialize the app to use the new values?
The only way it works now is to reload/refresh the page.
Any ideas?
You can delete and then reinitialize the the app with
firebase.app().delete().then(function() {
firebase.initializeApp(myNewConfig);
});
Alternatively, you can keep the old app around and initialize a new app with a different name:
firebase.initializeApp(myConfig1);
firebase.initializeApp(myConfig2, 'myOtherApp');
var db1 = firebase.database();
var db2 = firebase.app('myOtherApp').database();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With