docs: fix closing tag for whitespace examples (#64425)

PR Close #64425
This commit is contained in:
Danny Koppenhagen 2025-10-15 09:13:09 +02:00 committed by Andrew Kushnir
parent e63ea3f102
commit 4c35682ee5

View file

@ -8,7 +8,7 @@ Most developers prefer to format their templates with newlines and indentation t
```angular-html
<section>
<h3>User profile</p>
<h3>User profile</h3>
<label>
User name
<input>
@ -20,7 +20,7 @@ This template contains whitespace between all of the elements. The following sni
```angular-html
<!-- Total Whitespace: 20 -->
<section>###<h3>User profile</p>###<label>#####User name#####<input>###</label>#</section>
<section>###<h3>User profile</h3>###<label>#####User name#####<input>###</label>#</section>
```
Preserving the whitespace as written in the template would result in many unnecessary [text nodes](https://developer.mozilla.org/en-US/docs/Web/API/Text) and increase page rendering overhead. By ignoring this whitespace between elements, Angular performs less work when rendering the template on the page, improving overall performance.