Im having an Observable that is storing data from an API.
countDownLogout$: Observable<any> = this.authenticationService
.getCountdown()
.pipe(
tap((x) => {
console.log('calling the service');
setTimeout(() => {
this.authenticationService.getCountdown().subscribe();
}, 20000);
})
<ng-container *ngIf="countDownLogout$ | async as countDownLogout">
The API is called but observable and as result data and console log are not fired. Except from the first time.
I would like the observable to re-take the data after re-calling the API.