1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to use signal with Angular Reactive Forms

Discussão em 'Angular' iniciado por Alireza Ahmadi, Setembro 27, 2024.

  1. I have a template driven form in Angular 17 and I can use signal with my form like this:

    @Component({
    selector: 'app-root',
    template: `
    <input [ngModel]='firstName()' (ngModelChange)="firstName.set($event)">
    <input [ngModel]='lastName()' (ngModelChange)="lastName.set($event)">
    `,
    })
    export class App {
    firstName= signal('first name');
    lastName= signal('last name');
    }


    Any idea how can I use angular signals with reactive forms?

    Continue reading...

Compartilhe esta Página