0.1.1 • Published 8 years ago

rest-ngx v0.1.1

Weekly downloads
43
License
MIT
Repository
github
Last release
8 years ago

rest-ngx

It's implementation of RestHandler which uses Angular HttpClient

How to install and setup it

& npm i --save rest-core rest-ngx

In you app module

// AoT requires an exported function for factories
export function myHandlerFactory(http: HttpClient) {
    return new MyRestHandler(http);
}

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,

    // Default RestHandler uses class `RestHandlerHttpClient`
    RestModule.forRoot()
    
    // Or set you own handler
    //RestModule.forRoot({
    //  handler: { provide: RestHandler, useFactory: (myHandlerFactory), deps: [HttpClient] }
    //})
  ],
  declarations: [...],
  bootstrap: [...],
  entryComponents: [...],
  providers: [...]
})
export class AppModule {
}

Docs about rest-core

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago