1 2 3 4 5 6 7 8 9 10 11 12
angular.module('SessionsCtrl', []).controller('SessionController', ['$scope', '$http', 'SessionService', function ($scope, $http, SessionService) { $scope.session = { logged: true, name: SessionService.get() } $scope.disconnect = function () { $scope.session.logged = false; } } ]);