Загрузка...

New in Angular 21.1: Signal-Based isActive Replaces Router.isActive

Angular 21.1 introduces a new standalone, signal-based isActive() function in the Router, replacing the deprecated "Router.isActive()" method. The new API returns a boolean signal representing whether a given URL is active or inactive, instead of returning a boolean directly.

The returned signal updates as the URL matches or does not match the current router state, enabling reactive patterns through computed signals or effects. Match options allow fine-grained control over how paths, query parameters, fragments, and matrix parameters are compared using exact, subset, or ignored.

This video provides a clear and concise technical explanation of the new isActive API. Using high-quality visual and animated demonstrations, it breaks down the changes step by step, helping you quickly understand what changed, why it changed, and how to use the new signal-based approach effectively.

Thanks to the @Angular Team for a new useful feature. 🤝

ℹ️ Source: https://github.com/angular/angular/pull/65861

Follow me on:
▪️LinkedIn: https://www.linkedin.com/in/igorsedov/
▪️Twitter: https://twitter.com/TheIgorSedov
▪️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 #angularforbeginners

Видео New in Angular 21.1: Signal-Based isActive Replaces Router.isActive канала Igor Sedov
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять