added angular routes structurew

This commit is contained in:
Mario Colque 2014-03-19 13:17:18 -03:00
commit 1660f982c4
4 changed files with 43 additions and 35 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('cosign',[
'ui.bootstrap',
'ui.router'
'ngRoute',
'ui.bootstrap'
]);

View file

@ -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('!');
});