Answers for "set variable inside div angular"

3

set variable inside div angular

// Synchronous:

myVar = { hello: '' };

<ng-container *ngIf="myVar; let var;">
  {{var.hello}}
</ng-container>
// Using async pipe:

myVar$ = of({ hello: '' });

<ng-container *ngIf="myVar$ | async; let var;">
  {{var.hello}}
</ng-container>
Posted by: Guest on November-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language