Browser Web APIs
Interactive demonstrations of 18 native Web APIs powered by Angular signals.
ποΈ Page Visibility
Tracks whether this tab is visible or hidden. Switch to another tab and watch the state change in real-time.
Service Implementation
import { PageVisibilityService } from '@angular-helpers/browser-web-apis';
readonly svc = inject(PageVisibilityService);
this.svc.watch().subscribe(state => {
console.log('Visibility changed:', state);
});Best for: Side effects that need to trigger outside of the template, global logging, or legacy RxJS architectures.
πΆ Network Information
Live connection quality tracking. Detect bandwidth changes, effective connection types, and offline/online transitions.
Manual RxJS Stream
import { NetworkInformationService } from '@angular-helpers/browser-web-apis';
readonly svc = inject(NetworkInformationService);
ngOnInit() {
const current = this.svc.getSnapshot();
this.svc.watch().subscribe(info => { ... });
}π Resize Observer
Track dimensions of any element. Useful for dynamic layouts that don't depend on the window size.
Service implementation
import { ResizeObserverService } from '@angular-helpers/browser-web-apis';
readonly svc = inject(ResizeObserverService);
this.svc.observe(element).subscribe(entry => {
const { width, height } = entry[0].contentRect;
// handle resize
});ποΈβπ¨οΈ Intersection Observer
Detect when elements enter or leave the viewport. Essential for lazy loading and scroll-triggered animations.
β Scroll down inside this box
Service Subscription
import { IntersectionObserverService } from '@angular-helpers/browser-web-apis';
readonly svc = inject(IntersectionObserverService);
this.svc.observeVisibility(element, { threshold: 0.5 })
.subscribe(isVisible => { ... });