angular.module('ngPrestashop', [])
    .provider('prestashop', function prestashopProvider() {
        var params = null;
        var baseUrl = null;

        function addParams(source, _params) {
            var __params = {};
            __params = angular.copy(source, __params);
            for (var param in _params) {
                __params[param] = _params[param];
            }
            return __params;
        }

        this.setParams = function (_params) {
            params = _params;
        };
        this.setBaseUrl = function (_baseUrl) {
            baseUrl = _baseUrl;
        };
        this.$get = ["$http", function ($http) {
            return {
                get: function (_params) {
                    return $http.get(baseUrl, {'params': addParams(params, _params)})
                },
                post: function (_params, body) {
                    return $http.post(baseUrl, body, {'params': addParams(params, _params)})
                }
            }
        }];
    });

angular.module('angular-prestashop', ['ngPrestashop', 'ngRoute', 'angular-md5'])
    .config(function ($interpolateProvider, $routeProvider, prestashopProvider) {

        $interpolateProvider.startSymbol('//');
        $interpolateProvider.endSymbol('//');

        $routeProvider
            .when("/", {redirectTo: "/settings"})
            .when("/settings", {controller: 'SettingsCtrl', templateUrl: "settings.html"})
            .when("/404", {templateUrl: "404.html"})
            .otherwise({redirectTo: "/"});

        prestashopProvider.setParams({
            'ajax': 1,
            'controller': 'AdminAngular',
            'token': ctrl_token
        });
        prestashopProvider.setBaseUrl('/admin-dev/index.php');

    })
    .provider('configuration', function ConfigurationProvider() {
        this.$get = ["$http", "prestashop", function ($http, prestashop) {
            return {
                set: function (key, value) {
                    return prestashop.post({'action': 'updateConfiguration', 'key': key}, value)
                },
                get: function (key) {
                    return prestashop.get({'action': 'getConfiguration', 'key': key})
                }
            };
        }];
    });
@@ -113,319 +113,11 @@
 s = 
-null;%0A        var baseUrl = null;%0A%0A        function addParams(source, _params) %7B%0A            var __params = %7B%7D;%0A            __params = angular.copy(source, __params);%0A            for (var param in _params) %7B%0A                __params%5Bparam%5D = _params%5Bparam%5D;%0A            %7D%0A            return __params;%0A        %7D%0A
+%7B%7D;
 %0A   
@@ -204,99 +204,8 @@
  %7D;%0A
-        this.setBaseUrl = function (_baseUrl) %7B%0A            baseUrl = _baseUrl;%0A        %7D;%0A
     
@@ -353,38 +353,57 @@
 get(
-baseUrl, %7B'params': addParams(
+location.pathname, %7B'params': $.extend(true, %7B%7D, 
 para
@@ -527,15 +527,25 @@
 ost(
-baseUrl
+location.pathname
 , bo
@@ -563,18 +563,27 @@
 s': 
-addParams(
+$.extend(true, %7B%7D, 
 para
@@ -1322,72 +1322,8 @@
 %7D);%0A
-        prestashopProvider.setBaseUrl('/admin-dev/index.php');%0A%0A
     

use $.extend instead of custom helper