#Getting data to re-render a page
6 messages · Page 1 of 1 (latest)
Ok, noted. didn't know that tbf
Do you know how I can fix this or is that all you wanted to add?
- Do you use onPush?
- Where/how do you set
userRolesandclaim?
It's quite possible you get data from the server and it never detects changes
I do not use onPush. I use the default strategy
The claim is got by a base class
private getAllInOneClaim(): void {
this.service.GetOneClaim(this.claim).pipe(first()).subscribe(res => {
this.common.ConsoleLog('getAllInOneClaim', res);
this.claim= res;
this.claimLoaded.emit(this.claim.OperatorID);
this.OnClaimLoaded();
this.getPeriodClaims();
});
}
the user roles are got from a service
getUserPermissions() {
if (!this._user) {
this.accountService.fetchOperatorPermissions(this.localStorageID).subscribe(
res => {
this._user = res;
this.userPermsUpdated.emit(res);
}
)
} else {
this.userPermsUpdated.emit(this._user);
}
}