Bound Sensor Project
August 12, 2017 ยท View on GitHub
I started this project because I couldn't find any easy way to find out once an element size inside of DOM changes. This doesn't exist until this day that I write this package by native browser except onresize for window.
I wrote this lightweight library to receive an event once an element's boundary changes.
Bound Sensor
This is the base library that is written for JavaScript project, you can find the code here and a working example here.
Angular Bound Sensor
This is a very small @Directive based on bound-sensor that does the job for you in Angular world. You can find the source code here, a live demo here and also an example source code here or here with CLI.
Known issue
IE 11 doesn't support custom event which is necessary to take advantage of communicating between elements within DOM. If you would like to use BoundSensor (or AngularBoundSensor) on IE 11 you have to install a polyfill for CustomEvent. I personally use this package, just import it into your polyfills.
Credits
Thanks to @nasreddineskandrani