#63015Add equivalent ngDefaultControl-esque directives for additional value types

Issue Details

3 months ago
No assignee
area: forms
geoff-ponnath-44115geoff-ponnath-44115
opened 3 months ago
Author

Which @angular/* package(s) are relevant/related to the feature request?

forms

Description

With Form Associated Custom Elements (FACE) now much more practical with advancements in the Element Internals API, its becoming easier to create a FACE that can be dropped into any framework. Currently, Angular has the ngDefaultControl directive that can be added to a FACE that uses a string value (for example <input type="text">) and allow it to be used with template driven and reactive forms, but thats not possible for other input types (for example a boolean <input type="checkbox">).

Proposed solution

There was already a PR that would solve this in 2022 but it was closed. However, the landscape has changed with updates to the Element Internals API, and FACEs are now a more practical solution for organizations that have multiple frameworks to support.

https://github.com/angular/angular/pull/45953

Alternatives considered

Custom directives can be added, or Angular wrappers for web components. With the existence of ngDefaultControl though, it would make sense to also have directives that address other input types.