I am new to Angular and Typescript, and I need help returning a boolean value from a function that I can use in *ngIf. I want this process to be seamless. Can someone assist me with this?
canView = false;
getView() {
this.permissionService.getPermissionChecker('can_view_site', 'can_view_site').pipe(
tap(res => {
this.canView = true;
);
}
On the template side
<app-site compact=true *ngIf="canView"></app-site>