Remove Restangular.

This commit is contained in:
Alexis Lahouze 2017-07-31 13:17:54 +02:00
parent 0b0c771558
commit 2ae8a9cfad
2 changed files with 0 additions and 14 deletions

View File

@ -65,7 +65,6 @@
"jquery": "^3.2.1", "jquery": "^3.2.1",
"meanie-angular-storage": "^1.3.1", "meanie-angular-storage": "^1.3.1",
"moment": "^2.18.1", "moment": "^2.18.1",
"ngx-restangular": "^1.0.11",
"ngx-toastr": "^5.3.1", "ngx-toastr": "^5.3.1",
"reflect-metadata": "^0.1.10", "reflect-metadata": "^0.1.10",
"rxjs": "^5.4.2", "rxjs": "^5.4.2",

View File

@ -12,7 +12,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { UpgradeModule } from '@angular/upgrade/static'; import { UpgradeModule } from '@angular/upgrade/static';
import { NgLoggerModule } from '@nsalaun/ng-logger'; import { NgLoggerModule } from '@nsalaun/ng-logger';
import { RestangularModule } from 'ngx-restangular';
import { ToastrModule } from 'ngx-toastr'; import { ToastrModule } from 'ngx-toastr';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
@ -31,18 +30,6 @@ import { ApiBaseURL, LogLevel } from './app.config';
ScheduleModule, ScheduleModule,
OperationModule, OperationModule,
NgLoggerModule.forRoot(LogLevel), 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(), ToastrModule.forRoot(),
NgbModule.forRoot() NgbModule.forRoot()
] ]