Skip to content

Commit 89698b3

Browse files
authored
fix(angular): standalone form components do not error when multiple are used (#28423)
Issue number: resolves #28418 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Due to stenciljs/output-targets#397, calling `proxyInputs` for the form controls caused an error to be logged in developer applications. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated to a version of the Angular output targets with a patch for this error - I also excluded the `utils.ts` from all `angular-component-lib` directories from prettier since it was causing a diff. These changes are autogenerated so we should not be linting them anyways. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.5.3-dev.11698340692.18daff2f`
1 parent 90acad1 commit 89698b3

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

core/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@playwright/test": "^1.39.0",
4848
"@rollup/plugin-node-resolve": "^8.4.0",
4949
"@rollup/plugin-virtual": "^2.0.3",
50-
"@stencil/angular-output-target": "^0.8.2",
50+
"@stencil/angular-output-target": "^0.8.3",
5151
"@stencil/react-output-target": "^0.5.3",
5252
"@stencil/sass": "^3.0.7",
5353
"@stencil/vue-output-target": "^0.8.6",

packages/angular/.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ scripts
33
test
44
proxies.ts
55
src/directives/proxies-list.ts
6-
src/directives/angular-component-lib/utils.ts
6+
**/*/angular-component-lib/utils.ts

packages/angular/src/directives/angular-component-lib/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ export const proxyInputs = (Cmp: any, inputs: string[]) => {
1212
set(val: any) {
1313
this.z.runOutsideAngular(() => (this.el[item] = val));
1414
},
15+
/**
16+
* In the event that proxyInputs is called
17+
* multiple times re-defining these inputs
18+
* will cause an error to be thrown. As a result
19+
* we set configurable: true to indicate these
20+
* properties can be changed.
21+
*/
22+
configurable: true,
1523
});
1624
});
1725
};

packages/angular/standalone/src/directives/angular-component-lib/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ export const proxyInputs = (Cmp: any, inputs: string[]) => {
1212
set(val: any) {
1313
this.z.runOutsideAngular(() => (this.el[item] = val));
1414
},
15+
/**
16+
* In the event that proxyInputs is called
17+
* multiple times re-defining these inputs
18+
* will cause an error to be thrown. As a result
19+
* we set configurable: true to indicate these
20+
* properties can be changed.
21+
*/
22+
configurable: true,
1523
});
1624
});
1725
};

0 commit comments

Comments
 (0)