Skip to content

Commit 098553b

Browse files
SkyZeroZxleonsenft
authored andcommitted
docs: update defer section to Markdown and fix absolute URL to relative in adev
1 parent d9712e6 commit 098553b

2 files changed

Lines changed: 9 additions & 43 deletions

File tree

  • adev/src/content/tutorials/deferrable-views/steps

adev/src/content/tutorials/deferrable-views/steps/2-loading-error-placeholder/README.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,11 @@
22

33
Deferrable views let you define content to be shown in different loading states.
44

5-
<div class="docs-table docs-scroll-track-transparent">
6-
<table>
7-
<tr>
8-
<td><code>@placeholder</code></td>
9-
<td>
10-
By default, defer blocks do not render any content before they are triggered. The <code>@placeholder</code> is an optional block that declares content to show before the deferred content loads. Angular replaces the placeholder with the deferred content after loading completes. While this block is optional, the Angular team recommends always including a placeholder.
11-
<a href="https://angular.dev/guide/templates/defer#triggers" target="_blank">
12-
Learn more in the full deferrable views documentation
13-
</a>
14-
</td>
15-
</tr>
16-
<tr>
17-
<td><code>@loading</code></td>
18-
<td>
19-
This optional block allows you to declare content to be shown during the loading of any deferred dependencies.
20-
</td>
21-
</tr>
22-
<tr>
23-
<td><code>@error</code></td>
24-
<td>
25-
This block allows you to declare content which is shown if deferred loading fails.
26-
</td>
27-
</tr>
28-
</table>
29-
</div>
5+
| Block | Description |
6+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7+
| `@placeholder` | By default, defer blocks do not render any content before they are triggered. The `@placeholder` is an optional block that declares content to show before the deferred content loads. Angular replaces the placeholder with the deferred content after loading completes. While this block is optional, the Angular team recommends always including a placeholder. [Learn more in the full deferrable views documentation](guide/templates/defer) |
8+
| `@loading` | This optional block allows you to declare content to be shown during the loading of any deferred dependencies. |
9+
| `@error` | This block allows you to declare content which is shown if deferred loading fails. |
3010

3111
The contents of all the above sub-blocks are eagerly loaded. Additionally, some features require a `@placeholder` block.
3212

adev/src/content/tutorials/deferrable-views/steps/3-defer-triggers/README.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@ By default, deferred content loads when the browser is idle. You can, however, c
66

77
Deferrable views offer two types of loading trigger:
88

9-
<div class="docs-table docs-scroll-track-transparent">
10-
<table>
11-
<tr>
12-
<td><code>on</code></td>
13-
<td>
14-
A trigger condition using a trigger from the list of built-in triggers.<br/>
15-
For example: <code>@defer (on viewport)</code>
16-
</td>
17-
</tr>
18-
<tr>
19-
<td><code>when</code></td>
20-
<td>
21-
A condition as an expression which is evaluated for truthiness. When the expression is truthy, the placeholder is swapped with the lazily loaded content.<br/>
22-
For example: <code>@defer (when customizedCondition)</code>
23-
</td>
24-
</tr>
25-
</table>
26-
</div>
9+
| Trigger | Description |
10+
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11+
| `on` | A trigger condition using a trigger from the list of built-in triggers.<br/>For example: `@defer (on viewport)` |
12+
| `when` | A condition as an expression which is evaluated for truthiness. When the expression is truthy, the placeholder is swapped with the lazily loaded content.<br/>For example: `@defer (when customizedCondition)` |
2713

2814
If the `when` condition evaluates to `false`, the `defer` block is not reverted back to the placeholder. The swap is a one-time operation.
2915

0 commit comments

Comments
 (0)