2015-06-29 22:51:29 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
2015-06-30 20:57:20 +00:00
|
|
|
angular.module('core').controller('HomeController', ['$rootScope', '$scope',
|
|
|
|
function($rootScope, $scope) {
|
2015-06-29 22:51:29 +00:00
|
|
|
// This provides Principal context.
|
2015-06-30 20:57:20 +00:00
|
|
|
// $scope.authentication = Principal;
|
2015-06-30 19:42:02 +00:00
|
|
|
// $scope.user = {};
|
2015-06-30 07:28:29 +00:00
|
|
|
|
2015-06-30 20:57:20 +00:00
|
|
|
// $rootScope.user = $window.user;
|
2015-06-30 19:42:02 +00:00
|
|
|
console.log($rootScope.user);
|
|
|
|
|
|
|
|
// Principal.identity().then(function(user){
|
|
|
|
// console.log(user);
|
|
|
|
// $scope.user = user;
|
|
|
|
// }, function(){
|
|
|
|
// console.log('error');
|
|
|
|
// });
|
2015-06-29 22:51:29 +00:00
|
|
|
// console.log("user.displayName: "+Principal.user()._id);
|
|
|
|
|
|
|
|
}
|
|
|
|
]);
|