🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

angular-equalizer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-equalizer

Equalize the height of a set of random elements, without necessarily having a common parent, container, etc.

4.0.0
latest
Source
npm
Version published
Weekly downloads
64
16.36%
Maintainers
1
Weekly downloads
 
Created
Source

Angular Equalizer

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.

Usage

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>

Elements must have an initial height and must not be hidden (their height is set to 0)

Dependencies

Needs jQuery and Lodash. Also, uses requestAnimationFrame, use a polyfill if you must

License

MIT

Keywords

angularjs

FAQs

Package last updated on 08 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts