Equalize the height of a set of random elements, without necessarily having a common parent, container, etc.
You can add and remove items on demand using the EqualizerState
service.
Add it to your dependencies
angular.module('yourapp', ['ngEqualizer']);
Use it in your directive
angular.module('yourapp').directive('yourDirective', ['EqualizerState', function(EqualizerState){
return {
link: function(scope, el, attr){
EqualizerState.add('yourDirective', el);
EqualizerState.add('yourDirective', angular.element('<div/>'));
}
};
}]);
Or use it directly in your elements
<div equalizer="group"></div>
<div equalizer="group" ng-repeat="item in items"></div>
<div equalizer="group" ng-if="current"></div>
Needs jQuery and Lo-dash/Underscore (for the debounce function)
MIT