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
This commit is contained in:
Jamie Rees 2024-12-10 11:47:26 +00:00 committed by Andrew Kushnir
parent c61ad65f64
commit e3bb6a0bb3

View file

@ -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.`,
);
}