mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
28a5925f53
This change adjust the equality comparator used by NgSwitch - now it defaults to === from previously used ==. This change is based on the following reasoning: - align behaviour with the built-in switch block); - improve performance (avoid type coercion); - enable better type-checking. BREAKING CHANGE: the NgSwitch directive now defaults to the === equality operator, migrating from the previously used ==. NgSwitch expressions and / or individual condition values need adjusting to this stricter equality check. The added warning message should help pinpointing NgSwitch usages where adjustements are needed. Fixes #33873 PR Close #51504