generator-sean
Version:
SEAN Official Yeoman Generator
19 lines (14 loc) • 510 B
JavaScript
;
angular.module('<%= slugifiedModuleName %>').controller('<%= classifiedControllerName %>Controller', ['$scope',
function($scope) {
//Watch user login
$scope.user = User.get();
$scope.isAuthenticated = Authentication.isAuthenticated();
$rootScope.$on('Auth',function(){
$scope.user = User.get();
$scope.isAuthenticated = Authentication.isAuthenticated();
});
// <%= humanizedControllerName %> controller logic
// ...
}
]);