BroadcastChannelService

Provides Observable-based inter-tab and inter-context communication via the BroadcastChannel API. Channels are auto-closed on component destroy.

TypeScriptexample.ts
import { BroadcastChannelService } from '@angular-helpers/browser-web-apis'

# Methods

MethodSignatureReturnsDescription
openopen(name: string): Observable<T>Observable<T>Public method open.
postpost(name: string, data: T): voidvoidPublic method post.
closeclose(name: string): voidvoidPublic method close.
closeAllcloseAll(): voidvoidPublic method closeAll.
getOpenChannelsgetOpenChannels(): string[]string[]Public method getOpenChannels.
LCP N/A
CLS N/A
INP N/A