UNPKG

rs-restangular

Version:

Restful Resources service for Angular 2 apps

43 lines 1.45 kB
"use strict"; var RestangularConfig = (function () { function RestangularConfig() { this._baseUrl = ''; this._requestInterceptors = []; this._responseInterceptors = []; } RestangularConfig.prototype.addResponseInterceptor = function (interceptor) { this._responseInterceptors.push(interceptor); return this; }; RestangularConfig.prototype.addRequestInterceptor = function (interceptor) { this._requestInterceptors.push(interceptor); return this; }; Object.defineProperty(RestangularConfig.prototype, "responseInterceptors", { get: function () { return this._responseInterceptors; }, enumerable: true, configurable: true }); Object.defineProperty(RestangularConfig.prototype, "requestInterceptors", { get: function () { return this._requestInterceptors; }, enumerable: true, configurable: true }); Object.defineProperty(RestangularConfig.prototype, "baseUrl", { get: function () { return this._baseUrl; }, set: function (baseUrl) { this._baseUrl = baseUrl.replace(/\/$/g, ''); }, enumerable: true, configurable: true }); return RestangularConfig; }()); exports.RestangularConfig = RestangularConfig; //# sourceMappingURL=/home/rodolfosilva/htdocs/outros/restangular/src/config.js.map