mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: fix min/max form template examples
This commit is contained in:
committed by
Pawel Kozlowski
parent
3093edcad0
commit
42391329c2
@@ -480,7 +480,7 @@ import {form, FormField, required, min, max} from '@angular/forms/signals';
|
||||
imports: [FormField],
|
||||
template: `
|
||||
<label>
|
||||
Age (between {{ ageForm.age().min() }} and {{ ageForm.age().max() }})
|
||||
Age (between {{ ageForm.age().min?.() }} and {{ ageForm.age().max?.() }})
|
||||
<input type="number" [formField]="ageForm.age" />
|
||||
</label>
|
||||
|
||||
@@ -521,12 +521,8 @@ import {form, FormField, max} from '@angular/forms/signals';
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Quantity (max: {{ inventoryForm.quantity().max() }})
|
||||
<input
|
||||
type="number"
|
||||
[formField]="inventoryForm.quantity"
|
||||
[max]="inventoryForm.quantity().max()"
|
||||
/>
|
||||
Quantity (max: {{ inventoryForm.quantity().max?.() }})
|
||||
<input type="number" [formField]="inventoryForm.quantity" />
|
||||
</label>
|
||||
`,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user