From e3bb6a0bb3150cd71e3fed027e1e3cdc8efb1930 Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Tue, 10 Dec 2024 11:47:26 +0000 Subject: [PATCH] refactor(common): update the NgOptimizedImage message to use `@if` instead of `*ngIf` (#59131) This commit updates an error message to mention `@if` rather than the `*ngIf` directive. PR Close #59131 --- .../src/directives/ng_optimized_image/ng_optimized_image.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts b/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts index 78bcab950d3..6a822176371 100644 --- a/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts +++ b/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts @@ -971,7 +971,7 @@ function postInitInputChangeError(dir: NgOptimizedImage, inputName: string): {} `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` + `The NgOptimizedImage directive will not react to this input change. ${reason} ` + `To fix this, either switch \`${inputName}\` to a static value ` + - `or wrap the image element in an *ngIf that is gated on the necessary value.`, + `or wrap the image element in an @if that is gated on the necessary value.`, ); }