mirror of
https://github.com/Febbweiss/CloudBudget-AngularJS.git
synced 2026-03-04 22:35:38 +00:00
First commit
This commit is contained in:
34
public/js/routes.js
Normal file
34
public/js/routes.js
Normal file
@@ -0,0 +1,34 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('routes', [])
|
||||
.config(config);
|
||||
|
||||
config.$inject = ['$routeProvider', '$locationProvider'];
|
||||
|
||||
function config($routeProvider, $locationProvider) {
|
||||
$routeProvider
|
||||
.when('/', {
|
||||
controller: 'HomeController',
|
||||
templateUrl: 'home/home.view.html',
|
||||
controllerAs: 'vm'
|
||||
})
|
||||
|
||||
.when('/login', {
|
||||
controller: 'LoginController',
|
||||
templateUrl: 'login/login.view.html',
|
||||
controllerAs: 'vm'
|
||||
})
|
||||
|
||||
.when('/register', {
|
||||
controller: 'RegisterController',
|
||||
templateUrl: 'register/register.view.html',
|
||||
controllerAs: 'vm'
|
||||
})
|
||||
|
||||
.otherwise({redirectTo: '/login'});
|
||||
|
||||
$locationProvider.html5Mode(true);
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user