Skip to content

Commit

Permalink
feat(plugins): register plugin cancelRequest by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonornela committed Mar 16, 2017
1 parent f283e07 commit c439054
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { BrowserXhr, ConnectionBackend, RequestOptions, ResponseOptions, XSRFStrategy } from '@angular/http';
import {
CancelRequestPlugin,
DefaultOptionsToken,
Events,
Http,
Expand Down Expand Up @@ -58,6 +59,11 @@ export interface TypePlugins {
}

export const DefaultPlugins: any = [
{
provide: HttpPluginsToken,
useClass: CancelRequestPlugin,
multi: true
},
{
provide: HttpPluginsToken,
useClass: ParseResponsePlugin,
Expand Down

0 comments on commit c439054

Please sign in to comment.