I'm using ANGULARJS / UI-ROUTES , and currently my application after login only keeps the email, I need to also have the user ID logged in. The issue of the routes I get, the problem is that he does not see the ID to be able to bring. I think the problem may be in my claims ?
code follows.
This is where I pass the id (which is null because "user" only comes the email)
<li ng-show="user"><a ui-sref="perfil({userId:user.id})">OLÁ, <em>{{ user }}</em></a></li>
Here is my controller that tries to get the id of the parameter that passes, but only comes null because the user.id is null
angular.module('scases').controller('PerfilCtrl', PerfilCtrl);
PerfilCtrl.$inject = ['$scope', 'UserFactory', '$stateParams'];
function PerfilCtrl($scope, UserFactory, $stateParams) {
$scope.id = $stateParams.userId;
My real question is: Where will I get the user id logged in, if when I log in, just come the email?