From 61d2e2f5a512bee967999d514a10399198e708b1 Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:53:49 +0100 Subject: [PATCH] example: CVA (#36) --- apps/example/src/app/app.component.ts | 3 + apps/example/src/app/app.routes.ts | 4 + .../address/address.component.ts | 79 ++++++++++++++++ .../src/app/form-with-cva/address/address.ts | 6 ++ .../form-with-cva/form-with-cva.component.ts | 94 +++++++++++++++++++ .../src/lib/signal-input.directive.ts | 8 +- 6 files changed, 190 insertions(+), 4 deletions(-) create mode 100644 apps/example/src/app/form-with-cva/address/address.component.ts create mode 100644 apps/example/src/app/form-with-cva/address/address.ts create mode 100644 apps/example/src/app/form-with-cva/form-with-cva.component.ts diff --git a/apps/example/src/app/app.component.ts b/apps/example/src/app/app.component.ts index 37a726b..4edcf1f 100644 --- a/apps/example/src/app/app.component.ts +++ b/apps/example/src/app/app.component.ts @@ -16,6 +16,9 @@ import { RouterLink, RouterOutlet } from '@angular/router';
{{ + { + state: form.state(), + dirtyState: form.dirtyState(), + touchedState: form.touchedState(), + valid: form.valid() + } | json + }} ++ +
{{ form.value() | json }}+ +
{{ form.errorsArray() | json }}+