Support angular control flow (#15606)
Co-authored-by: dweizhe <d.weizhe@anyong.com.tw> Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
31 files changed
+1085
-5
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<h3>@if and @else</h3>
|
||||
<div>
|
||||
<input #checkbox type="checkbox" [checked]="isChecked()" (change)="isChecked.set(checkbox.checked)" id="checkbox"/>
|
||||
</div>
|
||||
<div>
|
||||
@if (isChecked()) {
|
||||
<span>Checked</span>
|
||||
}
|
||||
@else {
|
||||
<span>Not checked</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (users$ | async; as users) { {{ users.length }} }
|
||||
@else if (users$ | async; as users) { {{ users.length }} }
|
||||
|
||||
<div *ngIf="users$ | async; as users">{{ users.length }}</div>
|
||||
|
||||
@else {}
|
||||
|
||||
|
||||
@if (isDev) {}
|
||||
@else if (test) {}
|
||||
|
||||
@if (foo( "quotes")) {}
|
||||
@else if (foo( 'quotes')) {}
|
||||
|
||||
@if ( widthCategory !== undefined && widthCategory >
|
||||
topStartToSideStartMaxSize) {
|
||||
<app-component />
|
||||
}
|
||||
|
||||
@if ( widthCategory; as item) {
|
||||
}
|
||||
|
||||
<div *ngIf="widthCategory; as item"></div>
|
||||
Reference in new issue
Block a user