You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/component-guide.md
+33-13Lines changed: 33 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -849,6 +849,24 @@ export {
849
849
850
850
This ensures your component is properly exported and available for use in standalone Angular applications.
851
851
852
+
#### Output Target Configuration
853
+
854
+
Update the `angularOutputTarget` configuration in [`stencil.config.ts`](/core/stencil.config.ts) to exclude your new component from the generated proxies. This is necessary because value accessors for these components are manually implemented in the standalone package.
855
+
856
+
```typescript
857
+
angularOutputTarget({
858
+
// ... other config
859
+
excludeComponents: [
860
+
...excludeComponents,
861
+
// ... other excludes
862
+
/**
863
+
* Value Accessors are manually implemented in the `@ionic/angular/standalone` package.
864
+
*/
865
+
'ion-new-component'
866
+
]
867
+
})
868
+
```
869
+
852
870
### Angular Tests
853
871
854
872
Add tests for the new component to the existing Angular test files:
@@ -871,27 +889,29 @@ These files contain tests for form integration and input behavior. Review how si
871
889
872
890
#### Output Target Configuration
873
891
874
-
Update the `vueOutputTarget` configuration in `stencil.config.ts` to include the new component:
892
+
Update the `vueOutputTarget` configuration in [`stencil.config.ts`](/core/stencil.config.ts):
875
893
876
-
```typescript
894
+
- Add your new component to the appropriate `componentModels` array, based on its behavior:
895
+
- For boolean inputs, add to the array with `targetAttr: 'checked'` and `event: 'ion-change'`
896
+
- For select-like inputs, add to the array with `targetAttr: 'value'` and `event: 'ion-change'`
897
+
- For text/numeric inputs, add to the array with `targetAttr: 'value'` and `event: 'ion-input'`
898
+
899
+
For example, if your component is a text input, add it to:
900
+
```js
877
901
vueOutputTarget({
878
902
// ... other config
879
903
componentModels: [
904
+
// ... other models
880
905
{
881
-
elements: ['ion-new-component'],
882
-
targetAttr: 'value', // or 'checked' for boolean inputs
883
-
event: 'ion-input', // or 'ion-change' depending on the component
0 commit comments