2.2.9 • Published 5 years ago

@gorniv/ngx-transfer-http v2.2.9

Weekly downloads
530
License
MIT
Repository
github
Last release
5 years ago

ngx-transfer-http

Implementation http for Angular universal work based on TransferState

The package can be installed using:

npm install @gorniv/ngx-transfer-http --save

v1.1.2 is for use on Angular5

>v1.1.2 are for use on Angular6

TransferHttpModule

in app.module.ts

import { TransferHttpModule, TransferHttpService } from '@gorniv/ngx-transfer-http';


@NgModule({
  imports: [
    BrowserModule.withServerTransition({ appId: 'my-app' }),
    HttpClientModule,
    TransferHttpModule
    ...

TransferHttpService

in app.module.ts

import { TransferHttpModule, TransferHttpService } from '@gorniv/ngx-transfer-http';

@NgModule({
  providers: [TransferHttpService],
  imports: [
   ...
})

use in component or service:

import { TransferHttpService } from '@gorniv/ngx-transfer-http';

...

constructor(private http: TransferHttpService){}

getData(): void{
    this.http.get<MyObjectModel>('https://reqres.in/api/users?delay=1').subscribe(result => {
      console.log(result);
      ...
    });

}

check: 1) Node server console 2) Open network in developer tools browser and your XHR network must be empty

2.2.9

5 years ago

2.2.8

5 years ago

2.2.6

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago