Angular 17 New Feature: Deferrable Views #angular #angular17

preview_player
Показать описание
Angular 17 introduces a new feature called deferrable views. In this video, I'll show you how to use one defer block in a view to check for image comments and use deferred loading when any exist. Now inside the template we can better control the page generation process depending on the conditions.

ℹ️ One use case mentioned in RFC "Deferred Loading" (the link is below) is deferred loading of video comments. My explanation is based on a similar case - deferred loading of an image comments.

A big thank you to the @Angular team for all their hard work on the new version! 👍

Sources:

I hope this is helpful!
Рекомендации по теме
Комментарии
Автор

Defer is a good addition for lazy loading of components

jamalhussayn
Автор

Explain please how is this different from using @if? You can put condition inside @if and conditionally show some content

DenysTurchyn-qy
Автор

i don't understand how this feature work, i mean how really work, don't you need lazy loading anymore in route? you would load all component without lazy loading and you play with defer feature in template component! that's correct

haroldpepete