Here's my code. I get this error semi-consistently when logging in, but if the login button is clicked twice it happens every time.
app.controller('login', ['$scope', '$state', '$rootScope', '$localStorage', '$location', 'userData', '$firebaseObject', 'firebase', '$timeout', function($scope, $state, $rootScope, $localStorage, $location, userData, $firebaseObject, firebase, $timeout) {
var _ = firebase.database().ref()
$scope.signin = function(user) {
firebase.auth().signInWithEmailAndPassword(user.email, user.password).then(function(user) {
$localStorage.currentUser = user
$localStorage.me = $firebaseObject(_.child('user/' + $localStorage.currentUser.uid))
}).catch(function(error) {
console.log(error)
});
}
}]);
I don't see what could be triggering the error, and it must be on this page because as of yet, I'm not redirecting to anywhere else.
I thought this may have been my error: Error: Maximum call stack size exceeded on Angualr Ui Router State Change but if I understand it right, this is due to a redirection loop, I'm not doing any redirecting, just opening a Firebase Auth session correct?
UPDATE: After removing both $localStorage lines, the error does not occur, issue with my implementation or $localStorage?
