-
-
+
+
+
+
@@ -62,6 +72,10 @@
+
+
+
+
diff --git a/js/app.js b/js/app.js
index 824bf8a74..840cb0bd9 100644
--- a/js/app.js
+++ b/js/app.js
@@ -3,8 +3,16 @@
angular.module('cosign',[
'ngRoute',
'ui.bootstrap',
- 'cosign.header'
+ 'cosign.header',
+ 'cosign.home',
+ 'cosign.transactions',
+ 'cosign.send',
+ 'cosign.backup'
]);
angular.module('cosign.header', []);
+angular.module('cosign.home', []);
+angular.module('cosign.transactions', []);
+angular.module('cosign.send', []);
+angular.module('cosign.backup', []);
diff --git a/js/config.js b/js/config.js
index d7823a7a6..77024638e 100644
--- a/js/config.js
+++ b/js/config.js
@@ -6,11 +6,18 @@ angular
.config(function($routeProvider) {
$routeProvider
- .when('/signin', {
+ .when('/', {
+ templateUrl: 'home.html'
+ }).when('/transactions', {
+ templateUrl: 'transactions.html'
+ }).when('/send', {
+ templateUrl: 'send.html'
+ }).when('/backup', {
+ templateUrl: 'backup.html'
+ }).when('/signin', {
templateUrl: 'signin.html'
- })
- .when('/home', {
- templateUrl: 'home.html'
+ }).otherwise({
+ templateUrl: '404.html'
});
});
diff --git a/js/controllers/backup.js b/js/controllers/backup.js
new file mode 100644
index 000000000..b425d739a
--- /dev/null
+++ b/js/controllers/backup.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('cosign.backup').controller('BackupController',
+ function($scope, $rootScope, $location) {
+ $scope.title = 'Backup';
+ });
diff --git a/js/controllers/header.js b/js/controllers/header.js
index 231a80d17..1623e7e0d 100644
--- a/js/controllers/header.js
+++ b/js/controllers/header.js
@@ -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;
};
diff --git a/js/controllers/home.js b/js/controllers/home.js
new file mode 100644
index 000000000..6d1c5ff34
--- /dev/null
+++ b/js/controllers/home.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('cosign.home').controller('HomeController',
+ function($scope, $rootScope, $location) {
+ $scope.title = 'Home';
+ });
diff --git a/js/controllers/send.js b/js/controllers/send.js
new file mode 100644
index 000000000..d529be997
--- /dev/null
+++ b/js/controllers/send.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('cosign.send').controller('SendController',
+ function($scope, $rootScope, $location) {
+ $scope.title = 'Send';
+ });
diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js
new file mode 100644
index 000000000..f8dcc9f6a
--- /dev/null
+++ b/js/controllers/transactions.js
@@ -0,0 +1,6 @@
+'use strict';
+
+angular.module('cosign.transactions').controller('TransactionsController',
+ function($scope, $rootScope, $location) {
+ $scope.title = 'Transactions';
+ });