Package Exports
- @ngx-resource/handler-fetch
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ngx-resource/handler-fetch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@ngx-resource/handler-fetch
It's implementation of ResourceHandler which uses fetch
How to install and setup it
& npm i --save @ngx-resource/core @ngx-resource/handler-ngx-http @ngx-resource/handler-fetchIn you app module
// AoT requires an exported function for factories
export function fetchHandlerFactory() {
return new ResourceHandlerFetch();
}
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
ResourceModule.forRoot({
handler: { provide: ResourceHandler, useFactory: (fetchHandlerFactory) }
})
],
declarations: [...],
bootstrap: [...],
entryComponents: [...],
providers: [...]
})
export class AppModule {
}