DrupalApiConstant
d7-services.commons
Constant for the d7-services module. Holds general options, request relevant data, defaults, filter options, imagestyles and so on.
DrupalApiConstant is editable in config phase
angular
.module("myModule", ["d7-services.commons"])
.config(function (DrupalApiConstant) {
//Define your drupal instance.
DrupalApiConstant.drupal_instance = 'http://your.projects.domain/';
//Override the path to your api.
//This path is defined in "Edit Resource" under tab "Edit".
DrupalApiConstant.api_endpoint += 'v1/'; // results in "api/v1/";
//Override the default response format. (json,jsonp,php,rss,xml,yaml,...)
//Find a list of profided fromats in "Edit Resource" under tab "Server".
DrupalApiConstant.responseFormat = "application/json";
//Override the default public and private folders
DrupalApiConstant.publicFilePath = "new_public/";
DrupalApiConstant.privateFilePath = "new_private/";
//Override the Drupals default path to files.
DrupalApiConstant.filesPath = "sites/default/my_files/";
//Override the Drupals default image styles path.
DrupalApiConstant.imageStylesPath = "my_styles/";
//Override the default image styles and add custom once.
DrupalApiConstant.imageStyles.large = 'modified_large';
DrupalApiConstant.imageStyles.new_style = 'new_style_name';
//Override the default language.
DrupalApiConstant.LANGUAGE_NONE = 'und';
}