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
Post a Comment