Skip to content

ResizeObserverService documentation

import { ResizeObserverService } from '@siemens/element-ng/resize-observer';

A service wrapping ResizeObserver. This is a service for those reasons:

• only one ResizeObserver should be used for performance reason.

• For Angular change detection to work, explicit ngZone calls are necessary

• Observable stream

Attributes and Methods

Name Type Description
observe()
(element: Element, throttle: number, emitInitial?: boolean, emitImmediate?: boolean) => Observable<ElementDimensions>

Observe the size of an element. Returns an observable with the changes.

Parameters

Types Documentation

import type { ElementDimensions } from '@siemens/element-ng/resize-observer';
Properties


Except where otherwise noted, content on this site is licensed under MIT License.