I am currently struggling with a code snippet in my loginCtrl.js file where I can't seem to get $rootScope to store the value of vm.userEmail.
app.controller('LoginCtrl', function($timeout, $q, $log, $rootScope /*$auth*/, $location, $mdToast) {
var vm = this;
vm.loginMessage = '';
vm.login = function(){
$auth.login({
$rootScope: vm.userEmail,
password: vm.userPassword
})
}
});
I believe using $rootScope would be beneficial for handling certain conditions when a specific user connects.
if ($rootScope == '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="651c3a1c25d0d1108040c094b0608">[email protected]</a>') {
data = [1,2,3,4]
} else {
data = [5,6,7,8]
}
If you have any ideas, suggestions or corrections, please feel free to share them ;)