javascript - Store Firebase url in an external properties file? -


i want put firebase url external text file , reference value within javascript file.

currently in files have var ref = new firebase("https://<your-firebase-app>.firebaseio.com"); want this: var ref = new firebase("https://" + fbappname + ".firebaseio.com");

this don't have replace firebase app name <your-firebase-app> every time push changes github account. i'd easier have url referenced in external file , add file git ignore.

you use angular constant. see example

angular.module('app', []);  .value('movietitle', 'the matrix');  .controller('mycontroller', function (movietitle) {   expect(movietitle).toequal('the matrix'); }) 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -