on-internet
← Community

How to use signal with Angular Reactive Forms

Stack Overflow ·

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?

Comments

Sign in or sign up to comment and upvote.

No comments yet.