Questions tagged [angular-transfer-state]

20 questions
0
votes
1 answer

Interceptor Type 'Observable' is not assignable to type 'Observable>'

I'm having trouble handling the response of a cached query. In order to improve the performance of my application, I investigated that using a TransferStateInterceptor was the best solution. But unfortunately I have a little problem to return the…
0
votes
1 answer

Angular Universal - Transfer state is empty if url have unsafe character - duplicate xhr calls

I'm using Angualar(12) with Angular Universal. I ran into a problem with a transfer state between server and client side. I'm using TransferHttpCacheModule in client side, and ServerTransferStateModule in server side module. I don't have any custom…
0
votes
1 answer

TransferState some part of resolved data is not present on client side, though it's present on the server

app.routing.module: { path: '', component: IndexComponent, resolve: { videos: GetVideosResolver }, }, GetVideosResolver: resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const VIDEOS_KEY = makeStateKey('videos'); if…
0
votes
1 answer

Angular Universal Transfer State not working as expected

I have an issue where data from my API is not being shown in the view source of my project. I did some research and came across the TransferState so I created a class: import { Injectable } from '@angular/core'; import { TransferState } from…
r3plica
  • 13,017
  • 23
  • 128
  • 290
0
votes
1 answer

Angular Universal SSR TransferState only first page data available

I've created an ApiService using the TransferState API to cache data from a wordpress: get(url, id) { const key = makeStateKey(id); if (this.transferState.hasKey(key)) { const item = this.transferState.get(key, null); return of(item); …
1
2