Angular 17 Feature defer loading | Deferrable views | Lazy loading components | Angular 17 Tutorial

Published: 26 January 2024
on channel: Code Sample
151
2

Angular 17 Feature deferred loading | Angular 17 Defer block: Create Lazy Loaded components with `when` trigger! Learn how to create a lazy-loaded component in Angular 17 using the new defer block with the `when` trigger. It's really powerful!

Angular 17 Feature: deferred loading: Using @defer in Angular 17 to implement lazy loading.

Angular 17 introduced a new @defer block that lets your lazy-load content based on specific conditions or events and deferred blocks support the following declarative trigger types:

1. on interaction - @defer (on interaction)
2. on hover - @defer (on hover)
3. on idle - @defer (on idle)
4. on timer - @defer (on timer(4s))
5. on viewport - @defer (on viewport)

Angular renders the on-interaction block when the user interacts with its @placeholder block. An interaction can be a click, touch focus, or input event, like keypress.

@defer (on interaction) {
Content block: Clicked on the interaction
}
@placeholder {
Content block: Placeholder – on interaction(click on it)
}
@error {
Content block: Error
}
@loading(minimum 2s) {
Loading...
}

Angular 17 Tutorial:-
*********************
Install Angular 17 with Standalone (true):-    • Install Angular 17 CLI on Windows | Upgrad...  
Angular 17 Routing For Beginners:-    • Angular 17 Routing For Beginners | Routing...  
Angular 17 Signals:-    • Angular 17 Signals Example |  Angular 17 N...  
What Is Server-Side Rendering (SSR) and Why use?:-    • Angular 17 Tutorial - Server-Side Renderin...  
Angular 17 Component Inheritance:-    • Angular 17 Tutorial | Angular 17 Component...  
using ViewContainerRef To Render Dynamic Components:-    • Angular 17 Tutorial | using ViewContainerR...  
Component Lifecycle Hooks:-    • Angular 17 Tutorial | Component Lifecycle ...  
Prerendering Static Site Generation (SSG):-    • Angular 17  Tutorial | Prerendering Static...  
Angular 17 for loop @for block Repeaters :- ttps://   • Angular 17 for loop example | @for block -...  
Angular 17 if else statement example:-    • Angular 17 if else statement example | @if...  
What's New in Angular 17?:-    • What's New in Angular 17 | The Best New Fe...  

#angular17 #Angular17defer #loading #AngularLazyloading #AngularDeferrableView #AngularInteraction #AngularHover #AngularIdle #AngularTimer #AngularViewport


On this page of the site you can watch the video online Angular 17 Feature defer loading | Deferrable views | Lazy loading components | Angular 17 Tutorial with a duration of online in good quality, which was uploaded by the user Code Sample 26 January 2024, share the link with friends and acquaintances, this video has already been watched 151 times on youtube and it was liked by 2 viewers. Enjoy your viewing!