firebaseauth not defined, something is wrong here
See original GitHub issueHi guys,
Just started a new ionic project that i have for school and after ionic scaffold the project I did this
bower install angularfire --save
and I see that it save angularfire in the bower.json file and the same goes for
bower install firebase --save
I inject the firebase in the main app
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives','firebase'])
and then in my controller
.controller('popularCtrl', ['$scope', '$firebaseObject', '$firebaseArray', '$firebaseAuth', function($scope, firebaseObject, firebaseArray, firebaseAuth) {
Then when I want to use the firebaseAuth function
var authObj = $firebaseAuth();
it says $firebaseAuth is not defined
This is my PR THL
I have looked at the doc and they say that I should do it like that.
and in my app.js I also added the sdk
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives','firebase']) .config(function(){ var config = { apiKey: "xxxxxxxxxxxxxxx", authDomain: "xxxxxxxxxxxxxxx", databaseURL: "xxxxxxxxxxxxxxx", storageBucket: "xxxxxxxxxxxxxxx", }; firebase.initializeApp(config); })
Can anyone tell my why this is happening, am I reading the doc wrong or ?
Version info
Angular: 1.5.6
Firebase: 3.0.3
AngularFire: 2.0.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks @CyrusZei 🚀🚀🚀
@iRoachie nice when they turn out to be easy fixes. Have a great day.
Adding the script tags did the trick. I have it here working. I submitted a pr to your repo