-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
docs: Update docs about equality. #54158
Conversation
Since v17, `ngSwitch` uses a strict equality. Fixes angular#54156
c76c3a6
to
8ee1156
Compare
@@ -192,8 +192,8 @@ export class NgSwitch { | |||
* that defines the subtree to be selected if the value of the match expression | |||
* matches the value of the switch expression. | |||
* | |||
* Unlike JavaScript, which uses strict equality, Angular uses loose equality. | |||
* This means that the empty string, `""` matches 0. | |||
* As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to mention v17 explicitly here. Normally the docs should reflect the current state (people can always access docs for the previous versions if needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It puts the rest of the sentence into a context.
I've no strong feeling about, but if we remove the mention of the version I'd also remove the end the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it was not strict before v17, then this information is useful.
This PR was merged into the repository by commit 4a44f73. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Since v17,
ngSwitch
uses a strict equality.Fixes #54156