I am following this AngularJs & Firebase App tutorial and have run into a Unknown provider: firebaseSimpleLoginProvider error. The tutorial is a few years outdated so I've updated my script references and would like to know if that is the reason I am receiving an error message or if there is something else in my code that i've done incorrectly.
CDNs:
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.js"></script>
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/1.1.3/angularfire.min.js"></script>
<script src="https://cdn.firebase.com/js/simple-login/1.6.4/firebase-simple-login.js"></script>
apps.js:
var myApp = angular
.module('angularjsFirebaseApp', ['firebase', 'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('app/about', {
templateUrl: 'views/about.html',
controller: 'AboutCtrl'
})
.otherwise({
redirectTo: '/'
});
});
main.js:
'use strict';
//angular.module('angularjsFirebaseApp')
myApp.controller('MainCtrl', ['$scope', '$firebaseObject', '$firebaseSimpleLogin', function ($scope, $firebaseObject, $firebaseSimpleLogin) {
var firebaseObj = new Firebase("https://vivid-heat-2200.firebaseapp.com");
$scope.SignIn = function ($scope) {
event.preventDefault();
var username = $scope.user.email,
password = $scope.user.password;
loginObj.$login('password', {
email: username,
password: password
})
.then(function (user) {
console.log('Auth successful');
}, function (error) {
console.log('Auth failure');
});
}
}]);