Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-dimensions-directive

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-dimensions-directive

Angular2 directive to get the dimensions of an Element, even if it change during time

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

angular2-dimensions-directive

Fires an Event with the (initial) dimensions of a DOM element and also whenever the dimensions change

npm version

forthebadge

Install

npm i angular2-dimensions-directive --save

Import the directive to your project and use it in your Component defining an event handler that is called whenever the dimensions of the element change

import { DimensionsDirective } from 'angular2-clickoutside-directive';

@Component({
  selector: 'my-app',
  template : `
  <div clickOutside (onDimensionsChange)="onDimensionsChangeHandler($event)"">
    A button
  </button>`,
  directives : [  ClickOutsideDirective ]
} )
class MyFirstComponent implements OnInit {
  constructor(){}

  onDimensionsChange($event)
  {
    console.log( $event.dimensions )
  }

  ngOnInit(){}
}

Contribute

Any pull-request is more than welcome :boom: :smile:

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.

License

MIT

Keywords

FAQs

Package last updated on 06 Oct 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc