20 lines
533 B
JavaScript
Executable file
20 lines
533 B
JavaScript
Executable file
'use strict';
|
|
|
|
|
|
angular.module('core').controller('HomeController', ['$scope', 'Principal',
|
|
function($scope, Principal) {
|
|
// This provides Principal context.
|
|
$scope.authentication = Principal;
|
|
$scope.authentication.user = Principal.identity();
|
|
|
|
console.log($scope.authentication.user);
|
|
// Principal.identity().then(function(user){
|
|
// console.log(user);
|
|
// $scope.authentication.user = user;
|
|
// }, function(){
|
|
// console.log('error');
|
|
// });
|
|
// console.log("user.displayName: "+Principal.user()._id);
|
|
|
|
}
|
|
]); |