ng-container vs ng-template
<div>
Pick your favorite hero
(<label><input type="checkbox" checked (change)="showSad = !showSad">show sad</label>)
</div>
<select [(ngModel)]="hero">
<ng-container *ngFor="let h of heroes">
<ng-container *ngIf="showSad || h.emotion !== 'sad'">
<option [ngValue]="h">{{h.name}} ({{h.emotion}})</option>
</ng-container>
</ng-container>
</select>
Also in JavaScript:
- js generate list of names with forloop
- Setting “checked” for a checkbox with jQuery
- express get all routes and methods
- 00:00:00 / 00:00:00 js
- bootstrap javascript cdn
- site "src="https://cdnjs.cloudflare.com/ajax/libs/popper.js"
- how to create my own filter in js
- javascript push array
- send data from form to another page angular
- can you get reinfected with the coronavirus
- capitalize
- javascript onclick
- js invert color
- installing vuex
- loop over json javascript
- array includes
- how to get session value using javascript
- jquery get base url
- properly import mat icon angular 10
- javascript set div height
- java script functions
- date difference
- on reload js
- dangerouslySetInnerHTML did not match error in React