Загрузка...

New in Angular 21: Customize the viewport trigger with options for IntersectionObserver

Angular 21 adds support for passing options to the viewport trigger for IntersectionObserver. This lets you customize settings like rootMargin and use the trigger property to specify which element to watch. All IntersectionObserver options are supported except root, making it easier to control when deferred content loads. The same approach also works for 'prefetch on viewport' and 'hydrate on viewport' triggers.

Thanks to the @Angular Team for the valuable work.

📌 Full documentation of IntersectionObserver options: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

ℹ️ Source: https://angular.dev/guide/templates/defer#defer

Follow me on:
▪️Twitter: https://twitter.com/TheIgorSedov
▪️LinkedIn: https://www.linkedin.com/in/igorsedov/
▪️Bluesky: https://bsky.app/profile/igorsedov.com
▪️Instagram: https://www.instagram.com/theigorsedov/

Website: https://igorsedov.com
Email: me@igorsedov.com

Angular is a registered trademark of Google and/or its affiliates. Other names may be trademarks of their respective owners/holders. Use of them does not imply any affiliation with or endorsement by them.

#angular #angular21

Видео New in Angular 21: Customize the viewport trigger with options for IntersectionObserver канала Igor Sedov
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять