Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Angular 14 typed forms #163

Open
CristhianParra opened this issue Jun 8, 2022 · 5 comments
Open

Integrate with Angular 14 typed forms #163

CristhianParra opened this issue Jun 8, 2022 · 5 comments

Comments

@CristhianParra
Copy link

Description

Now that angular/angular#13721 was finally solved, I think there's no longer a need for extra typings here, this project will still be useful for the additional helpers provided, but now it should be possible to leverage the type inference part to angular

Proposed solution

Delete duplicated types files

Alternatives considered

Keep the types duplicated, if current angular API is not suitable for integration with the other features of this package

Do you want to create a pull request?

No

@undsoft
Copy link
Contributor

undsoft commented Jun 9, 2022

I wonder if we could have a migration to migrate back to Angular forms.

@NetanelBasal
Copy link
Member

It's not exactly the same. Angular doesn't have the ControlsOf helper, for example.

@johncrim
Copy link

johncrim commented Jul 1, 2022

Based on my experience so far, it's easier to migrate from @ngneat/reactive-forms to ng 14 strongly typed forms than it is from ng 13 @angular/forms. Migrating from ng 13 keeps the prior lack of typing, but migrating from reactive-forms keeps the strong typing. I found it useful to replace:

import { FormControl, FormGroup } from '@ngneat/reactive-forms';
import { ValuesOf } from '@ngneat/reactive-forms/lib/types';

with

import { FormControl, FormGroup, ɵFormGroupRawValue as ValuesOf } from '@angular/forms';

I'm a fan of the @ngneat projects, but I'm also happy to reduce layers when possible.

@maximLyakhov
Copy link

This library developer experience is a more thoughtful than what Angular team done.
Hope they will take this project in consideration somehow.

@AKlaus
Copy link

AKlaus commented Aug 4, 2022

This post on Medium may share a way to leverage ControlsOf with the new Angular strongly-typed forms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants