DrupalHelperService
d7-services.commons
An abstract resource providing retrieve, create, update, delete and index functions. This service is used to handle the resources basic get put pust delete operations.
Helper to get path to api
String | Path to api |
Create path to resource
angular .module('myModule', ['d7-services.commons']) .controller('myController',function ($scope,DrupalHelperService) { var requestConfig = { url : DrupalHelperService.getApiPath()+'resource?param=test', method :'GET' }; }
Helper to get path to drupal server
String | Path to drupal server |
Create path to resource
angular .module('myModule', ['d7-services.commons']) .controller('myController',function ($scope,DrupalHelperService) { var drupalInstance = DrupalHelperService.getDrupalPath();
Helper to get full path to image style.
Param | Type | Details |
---|---|---|
style | String |
|
String | Path to image style (http://your.drupal.server/sites/default/files/styles/medium/) |
Create path to resource
angular .module('myModule', ['d7-services.commons']) .controller('myController',function ($scope,DrupalHelperService) { var imgPath = DrupalHelperService.getPathToImgByStyle()+'image_name_0.png'; }