Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
angular-resize-event
Advanced tools
[![github version](https://img.shields.io/github/package-json/v/vdolek/angular-resize-event/master?label=github)](https://github.com/vdolek/angular-resize-event) [![npm version](https://img.shields.io/npm/v/angular-resize-event)](https://www.npmjs.com/pac
Angular 14 directive for detecting changes of an element size.
It is as simple as:
<div (resized)="onResized($event)"></div>
It internally uses browser native ResizeObserver
. Therefore it is not supported in IE.
For Angular 11 you can use version 2.1.0 which internally uses uses ResizeSensor
from CSS Element Queries that is supported in IE.
Import the library in any Angular application by running:
$ npm install angular-resize-event
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the library module
import { AngularResizeEventModule } from 'angular-resize-event';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify AngularResizeEventModule library as an import
AngularResizeEventModule
],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Once your library is imported, you can use its resized
directive in your Angular application:
<div (resized)="onResized($event)"></div>
import { Component } from '@angular/core';
// Import the resized event model
import { ResizedEvent } from 'angular-resize-event';
@Component({...})
class MyComponent {
width: number;
height: number;
onResized(event: ResizedEvent) {
this.width = event.newRect.width;
this.height = event.newRect.height;
}
}
MIT © Martin Volek
FAQs
[![github version](https://img.shields.io/github/package-json/v/vdolek/angular-resize-event/master?label=github)](https://github.com/vdolek/angular-resize-event) [![npm version](https://img.shields.io/npm/v/angular-resize-event)](https://www.npmjs.com/pac
The npm package angular-resize-event receives a total of 0 weekly downloads. As such, angular-resize-event popularity was classified as not popular.
We found that angular-resize-event demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.