From 2ae8a9cfad03ec012058aa33eb4cca55b06ad958 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Mon, 31 Jul 2017 13:17:54 +0200 Subject: [PATCH] Remove Restangular. --- package.json | 1 - src/app.module.ts | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/package.json b/package.json index a500369..5df83e3 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "jquery": "^3.2.1", "meanie-angular-storage": "^1.3.1", "moment": "^2.18.1", - "ngx-restangular": "^1.0.11", "ngx-toastr": "^5.3.1", "reflect-metadata": "^0.1.10", "rxjs": "^5.4.2", diff --git a/src/app.module.ts b/src/app.module.ts index b7af799..5184371 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -12,7 +12,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { UpgradeModule } from '@angular/upgrade/static'; import { NgLoggerModule } from '@nsalaun/ng-logger'; -import { RestangularModule } from 'ngx-restangular'; import { ToastrModule } from 'ngx-toastr'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; @@ -31,18 +30,6 @@ import { ApiBaseURL, LogLevel } from './app.config'; ScheduleModule, OperationModule, NgLoggerModule.forRoot(LogLevel), - RestangularModule.forRoot((RestangularProvider) => { - RestangularProvider.setBaseUrl(ApiBaseURL); - - // Inject JSON in error instead the full response object. - RestangularProvider.setErrorInterceptor( - function(response, subject, responseHandler) { - // TODO Alexis Lahouze 2017-07-16 Handle 401 error. - subject.error(response.json()); - return false; - } - ); - }), ToastrModule.forRoot(), NgbModule.forRoot() ]