'use strict';

var policyAnalyzerApp = angular.module('policyAnalyzerApp',
    [
        'ngRoute',
        'notifications',
        'ui.bootstrap',
        'policyServiceModule',
        'policySummaryServiceModule',
        'dc.naviTreeService',
        'inclExcl.paginationServiceModule',
        'notificationServiceModule',
        'reportServiceModule',
        'inventoryServiceModule',
        'inventoryDirectives',
        'commonHelper',
        'inventoryHelpers',
        'inventoryDataServiceModule',
        'personalGroupsServiceModule', // dependency for inventoryFilterServiceModule
        'sharedGroupsServiceModule', // dependency for inventoryFilterServiceModule
        'inventoryFilterServiceModule',
        'inclExclDirectives',
        'inclExcl.naviTreeService',
        'includeExcludeServiceModule',
        'autoCompleteServiceModule',
        'inclExcl.paginationServiceModule',
        'customFilter',
        'actionServiceModule',
        'actionHelperModule',
    ]
);

policyAnalyzerApp.config(['$httpProvider', function ($httpProvider) {
    //This header was removed from recent version of angular.
    // PHP looks at this header to separate request between regular and AJAX.
    $httpProvider.defaults.headers.common["X-Requested-With"] = 'XMLHttpRequest';
    // IE fix to prevent caching
    $httpProvider.defaults.headers.common["If-Modified-Since"] = 0;
}]);
