diff --git a/packages/common/src/directives/ng_switch.ts b/packages/common/src/directives/ng_switch.ts index 6a37a83f1469..0c7bf9953c0d 100644 --- a/packages/common/src/directives/ng_switch.ts +++ b/packages/common/src/directives/ng_switch.ts @@ -144,7 +144,7 @@ export class NgSwitch { `Previously the case value "${ stringifyValue(value)}" matched switch expression value "${ stringifyValue( - this._ngSwitch)}", but this is no longer the case with the stricter equality check.` + + this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` + 'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.')); } this._lastCasesMatched = this._lastCasesMatched || matched; diff --git a/packages/common/test/directives/ng_switch_spec.ts b/packages/common/test/directives/ng_switch_spec.ts index 16d736eccac9..9de013df7520 100644 --- a/packages/common/test/directives/ng_switch_spec.ts +++ b/packages/common/test/directives/ng_switch_spec.ts @@ -124,7 +124,7 @@ import {expect} from '@angular/platform-browser/testing/src/matchers'; expect(consoleWarnSpy.calls.argsFor(0)[0]) .toBe( 'NG02001: As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' + - `Previously the case value "1" matched switch expression value "'1'", but this is no longer the case with the stricter equality check.` + + `Previously the case value "1" matched switch expression value "'1'", but this is no longer the case with the stricter equality check. ` + 'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.');