Skip to content

Long standing problems with template driven forms #51866

Open
@kemsky

Description

@kemsky

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

No

Description

  • built-in validators like required are still imported with FormsModule
  • ngModel type and type of the corresponding custom value accessor are not checked, effectively [ngModel] has any type and there is zero typecheck, you can pass any property of any type to [ngModel] (e.g Date instead of string) and compiler will be happy.
  • control value accessor does not have access to its validity status, component can only rely on css classes like ng-valid, but it wont work in case you want to show a dropdown which simply does not inherit these classes because it is rendered outside of the component
  • no way to disable built-in css classes like ng-valid
  • validation errors are still not propagated to the parent form
  • [ngModel] still delays write operation one tick compared to any other input property

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: formsfeatureIssue that requests a new featurefeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions