If you share your code maybe I can help.
@Cache({ ttl: 250 }) getUserNetIdById(id: number): Observable<string> { return this.http.get<AaiUser>(`${userPath}/${id}`, getHttpJwtOptions()).pipe(map(u => u.netId)); }
@Pipe({ name: 'getUserById' }) export class GetUserByIdPipe implements PipeTransform { constructor( private readonly userService: UserService ) { } transform(id: number): Observable<string> { return this.userService.getUserNetIdById(id); } }
<tr *ngFor="let docSpec of docSpecs"> <td> <small> {{docSpec.user}} {{docSpec.user | getUserById | async}} </small> </td> </tr>
and for userId=1, 17 I get some result but should be different
Regards, Tomaž
hm I can't upload image
Maybe a silly question but if you remove the @Cache decorator, do you actually get what you expect? Is there anyway you can share the project so that i can run it?
If you can please open an issue here with the steps to reproduce the problem.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you share your code maybe I can help.
- wrong result in the template:
and for userId=1, 17 I get some result but should be different
- img :
Regards, Tomaž
hm I can't upload image
Maybe a silly question but if you remove the @Cache decorator, do you actually get what you expect?
Is there anyway you can share the project so that i can run it?
If you can please open an issue here with the steps to reproduce the problem.