-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge release-8.2.0 #29534
Merged
Merged
merge release-8.2.0 #29534
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue number: resolves #28876 --------- <!-- 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. --> When assigning `componentProps` as inputs to an Angular component, we do `Object.assign`. When using the newer Angular Signals API for inputs the value of an input is a function: ```js myInput = input<string>('foo') // this is a function ``` The developer accesses the value of `myInput` in a template by doing `myInput()` since `myInput` is a function. If a developer passes `componentProps: { myInput: 'bar' }` then the value of `myInput` is set to this string value, overriding the function. As a result, calling `myInput()` results in an error because `myInput` is a string not a function. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Angular 14.1 introduced `setInput` which lets us hand off setting inputs to Angular. This will set input values properly even when using a Signals-based input. ## Does this introduce a breaking change? - [x] Yes - [ ] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> As part of this `NavParams` has been deprecated as it is incompatible with the `setInput` API. The old `Object.assign` worked to allow devs to get all of the `componentProp` key value pairs via `NavParams` even if they are not defined as `Inputs`. Using `setInput` will now throw an error, so developers need to create an `@Input` for each parameter. This means that `NavParams` has no purpose and can safely be retired in favor of Angular's Input API. Not removing NavParms would make it difficult for us to support new Angular APIs such as this Signals-based input API. ## 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: `8.1.1-dev.11715021973.16675b67` You will need to update the Ionic config to opt-in to the new option: ```ts useSetInputAPI: true, ``` --------- Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
package: angular
@ionic/angular package
package: core
@ionic/core package
package: react
@ionic/react package
package: vue
@ionic/vue package
release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release 8.2.0