|
'use strict';
/**
* @ngdoc overview
* @name domainManagerApp
* @description
* # domainManagerApp
*
* Main module of the application.
*/
angular
.module('domainManagerApp', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'firebase',
'angular-ladda',
'domainManagerApp.header',
'domainManagerApp.main',
'domainManagerApp.signin',
'domainManagerApp.domainsData',
'domainManagerApp.domainsList',
'domainManagerApp.addPost'
])
.config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
// Configs
//Enable cross domain calls
$httpProvider.defaults.useXDomain = true;
//Remove the header used to identify ajax call that would prevent CORS from working
delete $httpProvider.defaults.headers.common['X-Requested-With'];
// Routes
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/domains', {
templateUrl: 'views/domains.html',
controller: 'DomainsListController'
})
.when('/sign_in', {
templateUrl: 'views/signin.html',
controller: 'SignInController'
})
.when('/addPost', {
templateUrl: 'views/addPost.html',
controller: 'AddPostController'
})
.otherwise({
redirectTo: '/'
});
}]);
app.config(function($httpProvider) {
});
|