Hey there! I'm trying to figure out how to display some user information on my page, but I've hit a roadblock. A lot of the advice out there mentions using SimpleLogin, which is no longer supported, so here I am starting another thread.
Basically, I have functions for registration (name+email+password) and login (email+password). Once the user is authenticated, I want to greet them with a message like "Welcome {{user.name}}". It seems like such a simple task, but I just can't seem to make it work. When the user is authenticated and redirected to dashboard.html (I'm also facing some routing issues, but that's a topic for another time), all I see is the user id being printed out.
This is a snippet of my code:
app.controller('dashController', ['currentAuth', '$scope', '$firebaseArray', '$firebaseAuth', '$rootScope', 'Auth', '$location',
function(currentAuth, $scope, $firebaseArray, $firebaseAuth, $rootScope, Auth, $location){
var ref = new Firebase('https://url.firebaseio.com');
$scope.auth = $firebaseAuth(ref);
$scope.user = $firebaseArray(ref);
var authData = $scope.auth.$getAuth();
$scope.id = authData.uid;
}]);
Here's the HTML part:
<span>Welcome {{id}}</span>
All the user ids are stored in /users/uid/name+email+pass. Any suggestions would be greatly appreciated!