SiResizeObserverDirective documentation¶
selector
[siResizeObserver]
Directive to emit events on element size change. Use like this: <div (siResizeObserver)="handleResize($event)">
When the size of the element changes, an event in the format { width: number, height: number }
will be emitted. Also an initial event will be emitted on init.
By default, events are throttled and to an event every 100ms. To change this, add [resizeThrottle]="200"
on the same element. Input in milliseconds.
Input Properties¶
Name | Type | Default | Description |
---|---|---|---|
emitInitial ¶ | boolean | true | |
resizeThrottle ¶ | number | 100 |
Output Properties¶
Name | Type | Description |
---|---|---|
siResizeObserver ¶ | ElementDimensions |
Types Documentation¶
|
Except where otherwise noted, content on this site is licensed under MIT License.