It turns out that I am developing an application in ionic and with reference to firebase, my application has a login associated with it that works perfectly but it presents me with a problem and it is that it does not ask me the data query in the firebase.
I do explain, when I enter my mail user the application enters perfectly, but I have a tab that shows me different info that goes up to firebase, that is the query that is not doing me.
Code corresponding to the index I think I have the libraries and everything necessary for the operation of the app:
angular.module('starter', ['ionic', 'starter.controllers','starter.services',])
.run(function ($ionicPlatform, FirebaseDB,$rootScope, $state) {
$ionicPlatform.ready(function () {
var ref = new Firebase('aqui va el enlace de mi firebase')
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
FirebaseDB.initialize();
$rootScope.$on('$stateChangeError',
function (event, toState, toParams, fromState, fromParams, error) {
if (error === "NO USER") {
event.preventDefault();
console.log("go to login state");
$state.go('login', {});
}
});
})
corresponding to the app.js is here where the problem arises and is that as long as you do not add 'firebase' the app works but without the data query, when I add 'firebase' the screen remains blank. That is, when
angular.module('starter', ['ionic', 'starter.controllers','starter.services',´firebase'])
is that way I'm blocked from the app.