added the initial header controller

This commit is contained in:
Mario Colque 2014-03-25 11:35:04 -03:00
commit 4503caadd6
4 changed files with 52 additions and 7 deletions

View file

@ -2,5 +2,9 @@
angular.module('cosign',[
'ngRoute',
'ui.bootstrap'
'ui.bootstrap',
'cosign.header'
]);
angular.module('cosign.header', []);

15
js/controllers/header.js Normal file
View file

@ -0,0 +1,15 @@
'use strict';
angular.module('cosign.header').controller('HeaderController',
function($scope, $rootScope, $location) {
$scope.init = function() {
$rootScope.isLogged = false;
};
$scope.signout = function() {
$rootScope.isLogged = false;
$location.path('signin');
};
});