istic-openstack/client/js/app.js

38 lines
1 KiB
JavaScript
Raw Normal View History

2016-01-24 14:41:00 +01:00
2016-02-06 12:10:04 +01:00
/**
* The main app module instance
* @type angular.module.angular-1_3_6_L1749.moduleInstance
*/
2016-03-21 06:47:01 +01:00
var mainApp=angular.module("mainApp",['ngRoute', 'ngSanitize', 'ngCookies','lr.upload']);
2016-01-24 19:19:32 +01:00
2016-02-06 12:10:04 +01:00
/**
2016-02-07 11:10:44 +01:00
* Configure routeProvider
2016-02-06 12:10:04 +01:00
*/
2016-01-24 19:19:32 +01:00
mainApp.config(['$routeProvider', function($routeProvider){
2016-02-07 11:10:44 +01:00
2016-01-24 19:19:32 +01:00
$routeProvider.
when('/home',{
2016-03-06 14:51:50 +01:00
templateUrl: 'partials/home/home.html',
2016-01-24 19:19:32 +01:00
controller: 'homeCtrl'
}).
when('/network',{
2016-03-06 14:51:50 +01:00
templateUrl: 'partials/network/network.html',
2016-01-24 19:19:32 +01:00
controller: 'networkCtrl'
2016-03-06 14:51:50 +01:00
}).
when('/image',{
templateUrl: 'partials/image/image.html',
controller: 'imageCtrl'
2016-01-24 19:19:32 +01:00
}).otherwise({
redirectTo: '/home'
});
2016-02-05 19:35:38 +01:00
}]);
2016-02-07 11:10:44 +01:00
/**
* Configure httpProvider
*/
mainApp.config(['$httpProvider', function($httpProvider){
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
}]);
2016-02-05 19:35:38 +01:00