From 4503caadd6724fc0dbc9fd4d374e2928f8d3a8a5 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Tue, 25 Mar 2014 11:35:04 -0300 Subject: [PATCH] added the initial header controller --- css/main.css | 3 +++ index.html | 35 +++++++++++++++++++++++++++++------ js/app.js | 6 +++++- js/controllers/header.js | 15 +++++++++++++++ 4 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 js/controllers/header.js diff --git a/css/main.css b/css/main.css index e69de29bb..ae9d7f5d8 100644 --- a/css/main.css +++ b/css/main.css @@ -0,0 +1,3 @@ +body { + padding-top: 50px; +} diff --git a/index.html b/index.html index c6e0bce88..a53e7e5d1 100644 --- a/index.html +++ b/index.html @@ -9,15 +9,37 @@ -
cosign
- Signin - Home + -
+
+
+
- @@ -39,6 +60,8 @@ + + diff --git a/js/app.js b/js/app.js index 4ca90b43c..824bf8a74 100644 --- a/js/app.js +++ b/js/app.js @@ -2,5 +2,9 @@ angular.module('cosign',[ 'ngRoute', - 'ui.bootstrap' + 'ui.bootstrap', + 'cosign.header' ]); + +angular.module('cosign.header', []); + diff --git a/js/controllers/header.js b/js/controllers/header.js new file mode 100644 index 000000000..231a80d17 --- /dev/null +++ b/js/controllers/header.js @@ -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'); + }; + });