Merged
Conversation
thetaPC
reviewed
Dec 18, 2023
| * selected (i.e. unused for exactly 1). By default, the header | ||
| * text is set to "numberOfDates days". | ||
| * | ||
| * Developers who wish to access "this" inside of the function |
Contributor
There was a problem hiding this comment.
Suggested change
| * Developers who wish to access "this" inside of the function | |
| * Angular developers who wish to access "this" inside of the function |
Should it specify the framework? My concern is that other framework users might get confused with the comment.
Contributor
averyjohnston
left a comment
There was a problem hiding this comment.
I question if this is the best way to document this tip, for a few reasons:
- It creates a lot of duplicate text, which is annoying to maintain.
- I can see us easily forgetting to add the same tip to any future function props.
- It seems to be Angular-specific -- I was unable to access the right
thisin React (using an arrow function) or Vue (using.bind(this)). If it does actually apply to React or Vue, but my example is just subtly wrong, that only speaks to the need for example code somewhere.
Maybe we could put it in Development Tips instead? Or a page in the Angular-specific docs if it really is only relevant to Angular? I know that's not as discoverable, but my understanding is that this isn't an Ionic-specific issue, so I'm unsure if we need to give it much priority in the docs.
averyjohnston
approved these changes
Dec 19, 2023
Contributor
averyjohnston
left a comment
There was a problem hiding this comment.
LGTM aside from a component that was missed when updating to the link.
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number: N/A
What is the current behavior?
In #28694 there was some confusion around how to access
thisinside of a callback function passed to a property on Ionic components. The root issue was due to how thethiscontext is determined with developers being responsible for setting the appropriatethiscontext.What is the new behavior?
Does this introduce a breaking change?
Other information
Note: The link in the docs will not work until ionic-team/ionic-docs#3333 is merged.