У нас вы можете посмотреть бесплатно Real-Time Data Sharing Between Multiple Components in Angular 🔄 | Using Subject & Observable или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
In this video, we are going to discuss the approach to tranfer the data from one component to multiple components in real time with Subject and Observer in Angular application Sharing Data via Service & Subject This approach is commonly used for communication between components when they are not directly related by parent-child relationships This approach is known as Subject-Observer pattern or also called as Publish-subscribe pattern Service component : Acts as a centralized place to manage data communication between components using Subject for sending data and Observable for receiving data . Important Notes:- Observable Nature: Subject is both an Observable and an Observer. It can emit values (next(data)) and be subscribed to (getData() returns an Observable). Subscription: Components or services that want to receive the emitted data should subscribe to getData(). It's important to unsubscribe from this Observable to prevent memory leaks, typically done in the ngOnDestroy lifecycle hook. Multicasting: Subject allows multicasting, meaning it broadcasts the same data to multiple subscribers. This makes it useful for scenarios where multiple parts of your application need to react to the same events or data changes. #angulardevelopment #angular17 @xadmin