Skip to content

Commit

Permalink
fix: prevent rendering errors for text on enhanced image teaser cause…
Browse files Browse the repository at this point in the history
…d by Angular hydration (#1583)

* Angular hydration needs a valid HTML structure that was not given with the surrounding <p> tag for the text/description on the image
* use <div> instead of <p> element for freestyle HTML on enhanced image teaser to prevent rendering errors
* see https://angular.io/guide/hydration#valid-html-structure
  • Loading branch information
shauke authored Feb 1, 2024
1 parent 33ff2fc commit 6b8256e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<div class="enhanced-image-text">
<h1 *ngIf="pagelet.hasParam('Heading1')">{{ pagelet.stringParam('Heading1') }}</h1>
<h2 *ngIf="pagelet.hasParam('Heading2')">{{ pagelet.stringParam('Heading2') }}</h2>
<p
<div
*ngIf="pagelet.hasParam('Description')"
class="d-none d-sm-inline"
[ishServerHtml]="pagelet.stringParam('Description')"
></p>
></div>
<a
*ngIf="pagelet.hasParam('Link') && pagelet.hasParam('LinkText')"
[routerLink]="routerLink(pagelet, 'Link')"
Expand Down

0 comments on commit 6b8256e

Please sign in to comment.