From 1660f982c46f52cb466a7766a9302de61549ec45 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Wed, 19 Mar 2014 13:17:18 -0300 Subject: [PATCH] added angular routes structurew --- bower.json | 4 ++-- public/index.html | 45 ++++++++++++++++++++++++++++++--------------- public/js/app.js | 4 ++-- public/js/config.js | 25 +++++++++---------------- 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/bower.json b/bower.json index 240483abd..3d5bc6395 100644 --- a/bower.json +++ b/bower.json @@ -7,7 +7,7 @@ ], "dependencies": { "angular": "~1.2.x", - "angular-ui-router": "~0.2.10", - "angular-bootstrap": "~0.10.0" + "angular-bootstrap": "~0.10.0", + "angular-route": "~1.2.14" } } diff --git a/public/index.html b/public/index.html index 8d38f18b5..c6e0bce88 100644 --- a/public/index.html +++ b/public/index.html @@ -1,29 +1,44 @@ - - + + - cosign - Multisignature Wallet - - + cosign - Multisignature Wallet
cosign
-
- - + Signin + Home - - +
- - - - + + - + + + + + + + + + + + + + + + + diff --git a/public/js/app.js b/public/js/app.js index 661554b35..4ca90b43c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,6 +1,6 @@ 'use strict'; angular.module('cosign',[ - 'ui.bootstrap', - 'ui.router' + 'ngRoute', + 'ui.bootstrap' ]); diff --git a/public/js/config.js b/public/js/config.js index 662a555f0..d7823a7a6 100644 --- a/public/js/config.js +++ b/public/js/config.js @@ -3,23 +3,14 @@ //Setting up route angular .module('cosign') - .config(function($stateProvider, $urlRouterProvider) { - // For unmatched routes: - $urlRouterProvider.otherwise('/'); + .config(function($routeProvider) { - // States for cosign - $stateProvider - .state('home', { - url: '/', - templateUrl: 'views/home.html' + $routeProvider + .when('/signin', { + templateUrl: 'signin.html' }) - .state('signin', { - url: '/signin', - templateUrl: 'views/signin.html' - }) - .state('404', { - url: '/404', - templateUrl: 'views404.hmtl' + .when('/home', { + templateUrl: 'home.html' }); }); @@ -27,5 +18,7 @@ angular angular .module('cosign') .config(function($locationProvider) { - $locationProvider.hashPrefix('!'); + $locationProvider + .html5Mode(false); + //.hashPrefix('!'); });