ionic-team / stencil-ds-output-targets

These are output targets that can be added to Stencil for React and Angular.
https://stenciljs.com
MIT License
248 stars 112 forks source link

feat(angular): add value accessors to the directives array #436

Open AndreasIllg-COS opened 4 months ago

AndreasIllg-COS commented 4 months ago

Prerequisites

Describe the Feature Request

Value accessors are needed to make form controls useable in angular with ngModel, formControl or formControlName. The angular output target already copies all required value accessors to the generated components directory. But it creates a "directivesArrayFile" that only lists the proxy components. This feature request would add the value accessors to this list. Then the module file from the angular integration guide (https://stenciljs.com/docs/angular) could be used unchanged.

Describe the Use Case

When you add valueAccessorConfigs to the angularOutputTarget configuration, you can use the module file shown in the angular integration guide without changes. Currently you have to add the value accessors to the module file, which is something that is not documented.

Describe Preferred Solution

Add the value accessor directives to the directives array, so that they are declared and exported together with the proxy components.

Describe Alternatives

Document what to add in the module file to declare and export the value acessors.

Related Code

No response

Additional Information

You still have to export the classes in the public-api file, but that is a minor documentation issue then.

ionitron-bot[bot] commented 4 months ago

Thanks for the issue!

This project is currently maintained for the purposes of supporting Ionic Framework. At this time, only new issues & pull requests that support Ionic Framework will be prioritized. For the latest updates regarding the maintenance status of this project, please see this section of the project's README