creating basic controllers

This commit is contained in:
Gustavo Cortez 2014-03-26 09:18:42 -03:00
commit 7bef363585
9 changed files with 100 additions and 30 deletions

6
js/controllers/backup.js Normal file
View file

@ -0,0 +1,6 @@
'use strict';
angular.module('cosign.backup').controller('BackupController',
function($scope, $rootScope, $location) {
$scope.title = 'Backup';
});

View file

@ -2,7 +2,27 @@
angular.module('cosign.header').controller('HeaderController',
function($scope, $rootScope, $location) {
$scope.menu = [{
'title': 'Home',
'link': '#/'
}, {
'title': 'Transactions',
'link': '#/transactions'
}, {
'title': 'Send',
'link': '#/send'
}, {
'title': 'Backup',
'link': '#/backup'
}];
$scope.isActive = function(item) {
if (item.link.replace('#','') == $location.path()) {
return true;
}
return false;
};
$scope.init = function() {
$rootScope.isLogged = false;
};

6
js/controllers/home.js Normal file
View file

@ -0,0 +1,6 @@
'use strict';
angular.module('cosign.home').controller('HomeController',
function($scope, $rootScope, $location) {
$scope.title = 'Home';
});

6
js/controllers/send.js Normal file
View file

@ -0,0 +1,6 @@
'use strict';
angular.module('cosign.send').controller('SendController',
function($scope, $rootScope, $location) {
$scope.title = 'Send';
});

View file

@ -0,0 +1,6 @@
'use strict';
angular.module('cosign.transactions').controller('TransactionsController',
function($scope, $rootScope, $location) {
$scope.title = 'Transactions';
});