-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tomasz Ducin
committed
Dec 20, 2023
1 parent
856d257
commit 8ec3505
Showing
70 changed files
with
2,242 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,5 @@ testem.log | |
.DS_Store | ||
Thumbs.db | ||
|
||
src/assets/snippets/**/* | ||
!src/assets/snippets/.gitkeep | ||
.nx/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"author": "Tomasz Ducin <[email protected]>", | ||
"private": true, | ||
"version": "0.0.0", | ||
"node": ">=20.9.0", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "nx serve", | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<pre class="shiki light-plus" style="background-color: #FFFFFF" tabindex="0"><code><span class="line"><span style="color: #800000"><app-box></span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><</span><span style="color: #CD3131">content</span><span style="color: #800000">></span><span style="color: #000000">📚 The </span><span style="color: #800000"><code></span><span style="color: #0000FF">&#64;</span><span style="color: #000000">error</span><span style="color: #800000"></code></span><span style="color: #000000"> block allows you to declare content that will be shown if deferred loading fails.</span><span style="color: #800000"></</span><span style="color: #CD3131">content</span><span style="color: #800000">></span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><</span><span style="color: #CD3131">content</span><span style="color: #800000">></span><span style="color: #000000">🖐️ first, trigger HTTP request failure within your devtools: </span><span style="color: #800000"><em></span><span style="color: #000000">Network</span><span style="color: #800000"></em></span><span style="color: #000000"> tab -> right-click on one of the dynamic chunks loaded -> </span><span style="color: #800000"><strong></span><span style="color: #000000">Block request URL/domain</span><span style="color: #800000"></strong></span><span style="color: #000000"> -> and now trigger </span><span style="color: #800000"><code></span><span style="color: #0000FF">&#64;</span><span style="color: #000000">defer</span><span style="color: #800000"></code></</span><span style="color: #CD3131">content</span><span style="color: #800000">></span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><</span><span style="color: #CD3131">content</span><span style="color: #800000">></span><span style="color: #000000">🅰️ Currently there's no built-in </span><span style="color: #800000"><code></span><span style="color: #000000">retry</span><span style="color: #800000"></code></span><span style="color: #000000"> option available. More info in </span><span style="color: #800000"><a</span><span style="color: #000000"> </span><span style="color: #E50000">href</span><span style="color: #000000">=</span><span style="color: #0000FF">"https://github.com/angular/angular/issues/52800"</span><span style="color: #800000">></span><span style="color: #000000">this GH issue</span><span style="color: #800000"></a></span><span style="color: #000000">.</span><span style="color: #800000"></</span><span style="color: #CD3131">content</span><span style="color: #800000">></span></span> | ||
<span class="line"><span style="color: #800000"></app-box></span></span> | ||
<span class="line"></span> | ||
<span class="line"><span style="color: #795E26">@defer </span><span style="color: #000000">(</span><span style="color: #0000FF">on</span><span style="color: #000000"> interaction) {</span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><lazy-error></span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><article></span></span> | ||
<span class="line"><span style="color: #000000"> some </span><span style="color: #800000"><code></span><span style="color: #0000FF">&#64;</span><span style="color: #000000">defer (on idle)</span><span style="color: #800000"></code></span><span style="color: #000000"> content</span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"></article></span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"></lazy-error></span></span> | ||
<span class="line"></span> | ||
<span class="line"><span style="color: #000000">} </span><span style="color: #795E26">@placeholder </span><span style="color: #000000">(minimum </span><span style="color: #098658">500</span><span style="color: #000000">ms) {</span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><app-button></span><span style="color: #000000">👉 </span><span style="color: #800000"><strong></span><span style="color: #000000">interact with me</span><span style="color: #800000"></strong></span><span style="color: #000000"> 👈</span><span style="color: #800000"></app-button></span></span> | ||
<span class="line"><span style="color: #000000">} </span><span style="color: #795E26">@loading </span><span style="color: #000000">(after </span><span style="color: #098658">100</span><span style="color: #000000">ms; minimum </span><span style="color: #098658">1</span><span style="color: #000000">s) {</span></span> | ||
<span class="line"><span style="color: #000000"> </span><span style="color: #800000"><</span><span style="color: #CD3131">loader</span><span style="color: #800000"> /></span></span> | ||
<span class="line"><span style="color: #000000">} </span><span style="color: #0000FF">@error</span><span style="color: #000000"> {</span></span> | ||
<span class="line"><span style="color: #000000"> something went wrong! 😭</span></span> | ||
<span class="line"><span style="color: #000000">}</span></span> | ||
<span class="line"></span></code></pre> | ||
|
||
<pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080"><</span><span style="color: #569CD6">app-box</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #F44747">content</span><span style="color: #808080">></span><span style="color: #D4D4D4">📚 The </span><span style="color: #808080"><</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #569CD6">&#64;</span><span style="color: #D4D4D4">error</span><span style="color: #808080"></</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #D4D4D4"> block allows you to declare content that will be shown if deferred loading fails.</span><span style="color: #808080"></</span><span style="color: #F44747">content</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #F44747">content</span><span style="color: #808080">></span><span style="color: #D4D4D4">🖐️ first, trigger HTTP request failure within your devtools: </span><span style="color: #808080"><</span><span style="color: #569CD6">em</span><span style="color: #808080">></span><span style="color: #D4D4D4">Network</span><span style="color: #808080"></</span><span style="color: #569CD6">em</span><span style="color: #808080">></span><span style="color: #D4D4D4"> tab -> right-click on one of the dynamic chunks loaded -> </span><span style="color: #808080"><</span><span style="color: #569CD6">strong</span><span style="color: #808080">></span><span style="color: #D4D4D4">Block request URL/domain</span><span style="color: #808080"></</span><span style="color: #569CD6">strong</span><span style="color: #808080">></span><span style="color: #D4D4D4"> -> and now trigger </span><span style="color: #808080"><</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #569CD6">&#64;</span><span style="color: #D4D4D4">defer</span><span style="color: #808080"></</span><span style="color: #569CD6">code</span><span style="color: #808080">></</span><span style="color: #F44747">content</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #F44747">content</span><span style="color: #808080">></span><span style="color: #D4D4D4">🅰️ Currently there's no built-in </span><span style="color: #808080"><</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #D4D4D4">retry</span><span style="color: #808080"></</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #D4D4D4"> option available. More info in </span><span style="color: #808080"><</span><span style="color: #569CD6">a</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">href</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">"https://github.com/angular/angular/issues/52800"</span><span style="color: #808080">></span><span style="color: #D4D4D4">this GH issue</span><span style="color: #808080"></</span><span style="color: #569CD6">a</span><span style="color: #808080">></span><span style="color: #D4D4D4">.</span><span style="color: #808080"></</span><span style="color: #F44747">content</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #808080"></</span><span style="color: #569CD6">app-box</span><span style="color: #808080">></span></span> | ||
<span class="line"></span> | ||
<span class="line"><span style="color: #DCDCAA">@defer </span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">on</span><span style="color: #D4D4D4"> interaction) {</span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #569CD6">lazy-error</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #569CD6">article</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> some </span><span style="color: #808080"><</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #569CD6">&#64;</span><span style="color: #D4D4D4">defer (on idle)</span><span style="color: #808080"></</span><span style="color: #569CD6">code</span><span style="color: #808080">></span><span style="color: #D4D4D4"> content</span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"></</span><span style="color: #569CD6">article</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"></</span><span style="color: #569CD6">lazy-error</span><span style="color: #808080">></span></span> | ||
<span class="line"></span> | ||
<span class="line"><span style="color: #D4D4D4">} </span><span style="color: #DCDCAA">@placeholder </span><span style="color: #D4D4D4">(minimum </span><span style="color: #B5CEA8">500</span><span style="color: #D4D4D4">ms) {</span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #569CD6">app-button</span><span style="color: #808080">></span><span style="color: #D4D4D4">👉 </span><span style="color: #808080"><</span><span style="color: #569CD6">strong</span><span style="color: #808080">></span><span style="color: #D4D4D4">interact with me</span><span style="color: #808080"></</span><span style="color: #569CD6">strong</span><span style="color: #808080">></span><span style="color: #D4D4D4"> 👈</span><span style="color: #808080"></</span><span style="color: #569CD6">app-button</span><span style="color: #808080">></span></span> | ||
<span class="line"><span style="color: #D4D4D4">} </span><span style="color: #DCDCAA">@loading </span><span style="color: #D4D4D4">(after </span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4">ms; minimum </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">s) {</span></span> | ||
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #808080"><</span><span style="color: #F44747">loader</span><span style="color: #808080"> /></span></span> | ||
<span class="line"><span style="color: #D4D4D4">} </span><span style="color: #569CD6">@error</span><span style="color: #D4D4D4"> {</span></span> | ||
<span class="line"><span style="color: #D4D4D4"> something went wrong! 😭</span></span> | ||
<span class="line"><span style="color: #D4D4D4">}</span></span> | ||
<span class="line"></span></code></pre> |
Oops, something went wrong.