Skip to content

Instantly share code, notes, and snippets.

@sayinserdar
Last active February 25, 2021 09:52
Show Gist options
  • Save sayinserdar/80b28b3963ac49df82e70cab333bc928 to your computer and use it in GitHub Desktop.
Save sayinserdar/80b28b3963ac49df82e70cab333bc928 to your computer and use it in GitHub Desktop.
Template conditions
// Vague conditions that need investigating ❌
<div> *ngIf="user?.cat.id === cat?.id;"
Cute cat pictures need to be seen by that user.
</div>
// You can understand from naming and simpler expressions ✅
<div> *ngIf="isCatVisible"
Cute cat pictures need to be seen by that user.
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment