
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
angular-resize-event-package
Advanced tools
Angular directive for detecting changes of an element size.
Angular directive for detecting changes of an element size.
Forked from: https://github.com/vdolek/angular-resize-event. The last original version is not supported by angular 16 and 17.
Thanks to: https://github.com/vdolek, https://github.com/dereekb, and all contributors.
It is as simple as:
<div (resized)="onResized($event)"></div>
It internally uses browser native ResizeObserver
. Therefore it is not supported in IE.
Import the library in any Angular application by running:
$ npm install angular-resize-event-package
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-package';
@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-package';
@Component({...})
class MyComponent {
width: number;
height: number;
onResized(event: ResizedEvent) {
this.width = event.newRect.width;
this.height = event.newRect.height;
}
}
MIT © Laszlo Nemes
FAQs
Angular directive for detecting changes of an element size.
The npm package angular-resize-event-package receives a total of 1,671 weekly downloads. As such, angular-resize-event-package popularity was classified as popular.
We found that angular-resize-event-package demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.