mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs: fix applyWhenValue form example
This commit is contained in:
parent
0ef43c5ff3
commit
44c0293a3e
1 changed files with 2 additions and 2 deletions
|
|
@ -173,14 +173,14 @@ function isBankTransfer(value: PaymentMethod): value is BankTransfer {
|
|||
}
|
||||
|
||||
paymentForm = form(this.paymentModel, (schemaPath) => {
|
||||
applyWhenValue(schemaPath.payment, isCreditCard, (payment) => {
|
||||
applyWhenValue(schemaPath, isCreditCard, (payment) => {
|
||||
// TypeScript knows payment is scoped to CreditCard
|
||||
required(payment.cardNumber);
|
||||
required(payment.expiry);
|
||||
required(payment.cvv);
|
||||
});
|
||||
|
||||
applyWhenValue(schemaPath.payment, isBankTransfer, (payment) => {
|
||||
applyWhenValue(schemaPath, isBankTransfer, (payment) => {
|
||||
// TypeScript knows payment is scoped to BankTransfer
|
||||
required(payment.accountNumber);
|
||||
required(payment.routingNumber);
|
||||
|
|
|
|||
Loading…
Reference in a new issue