Angular ng-if=”” with multiple arguments
It is possible. <span ng-if=”checked && checked2″> I’m removed when the checkbox is unchecked. </span> http://plnkr.co/edit/UKNoaaJX5KG3J7AswhLV?p=preview
It is possible. <span ng-if=”checked && checked2″> I’m removed when the checkbox is unchecked. </span> http://plnkr.co/edit/UKNoaaJX5KG3J7AswhLV?p=preview
Another alternative is to nest conditions <ng-container *ngIf=”foo === 1;else second”></ng-container> <ng-template #second> <ng-container *ngIf=”foo === 2;else third”></ng-container> </ng-template> <ng-template #third></ng-template>
Angular v2 doesn’t support more than one structural directive on the same element. As a workaround use the <ng-container> element that allows you to use separate elements for each structural directive, but it is not stamped to the DOM. <ng-container *ngIf=”show”> <div *ngFor=”let thing of stuff”> {{log(thing)}} <span>{{thing.name}}</span> </div> </ng-container> <ng-template> (<template> before Angular v4) … Read more