1 2 3 4 5 6 7 8 9 10
angular.module('ProfileCtrl', ['SessionsServ', 'ApiServ']) .controller('ProfileCtrl', function ($scope, SessionServ, ApiServ) { $scope.session = SessionServ.cur; SessionServ.onChange(function () { $scope.session = SessionServ.cur; }); $scope.disconnect = function () { SessionServ.disconnect(); }; });