Skip to content

Instantly share code, notes, and snippets.

@Polyterative
Last active May 12, 2021 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Polyterative/9a29d752584012547835a65353db005b to your computer and use it in GitHub Desktop.
Save Polyterative/9a29d752584012547835a65353db005b to your computer and use it in GitHub Desktop.
Allows to declare anglar variables in the template to unify subscriptions for example
<div *ngIf='{
userActions:(dataService.userActions$|async)
} as globalBag'
>
<ng-container *ngIf='{
timepointCount:(globalBag.timePoints.length),
widthObject:({"width.%": globalBag.zoomValue+""})
}as lowerBag'
>
{{globalBag.userActions|json}}
</ng-container>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment