I’m trying to use the firebase auth provider similar to this tutorial. I’m getting the following error and I’m not sure how to triage it.
Uncaught Error: [$injector:unpr] Unknown provider: angularFireAuthProvider <- angularFireAuth
My app.js looks like this:
'use strict';
var app = angular.module('wefeed',
['ionic'
, 'wefeed.config'
, 'wefeed.controllers.signin'
, 'wefeed.controllers.signup'
, 'firebase']);
and my config.js:
'use strict';
// Declare app level module which depends on filters, and services
angular.module('wefeed.config', [])
app.config(
function($stateProvider) {
$stateProvider
.state('default', {
url: '/',
templateUrl: 'views/default.html' })
//.state('/', { templateUrl: 'views/default.html' })
.state('signin', {
url: '/signin',
templateUrl: 'views/users/signin.html' })
.state('signup', {
url: '/signup',
templateUrl: 'views/users/signup.html' })
//.when('/signup', { templateUrl: 'views/users/signup.html' })
//.when('/nflteams', { templateUrl: 'views/nfl/list.html'
// , authRequired: true })
//.otherwise( { redirectTo: '/' });
})
// establish authentication
.run(['angularFireAuth', 'FBURL', '$rootScope',
function(angularFireAuth, FBURL, $rootScope) {
angularFireAuth.initialize(new Firebase(FBURL), {scope: $rootScope, name: 'auth', path: '/signin'});
$rootScope.FBURL = FBURL;
}])
// your Firebase URL goes here
// should look something like: https://blahblahblah.firebaseio.com
.constant('FBURL', 'https://blahblahblah.firebaseio.com')
I’m happy to provide other code too, I’m not sure what is going on here.