Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
ngx-resize-observer
Advanced tools
Angular 18.x library to monitor changes to elements. Uses ResizeObserver to do the work.
Angular 18.x library to monitor changes to elements. Uses ResizeObserver to do the work.
If you would like to simply know when elements are visible, check out ngx-visibility.
If you want to be notified when DOM elements change properties, ngx-mutation-observer would be a good pick.
There's a live demo over at CodeSandbox.io.
Install like other Angular libraries. First run a command to download the module.
npm install ngx-resize-observer
Next, add the module to your project.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
// Import the module
import { NgxResizeObserverModule } from 'ngx-resize-observer';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent, ItemComponent],
// Include the module.
imports: [BrowserModule, FormsModule, NgxResizeObserverModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
Finally, you leverage the service directly or use some directives for common uses.
Emits ResizeObserverEntry
when a resize is detected for that element.
<div (onResize)="handleResize($event)"></div>
Only one property is configurable, which is the box model. When not specified, it defaults to "content-box". To change this, use the resizeBoxModel
directive. The only allowed values are "content-box" and "border-box".
<div (onResize)="handleResize($event)" resizeBoxModel="border-box"></div>
This project is licensed under an MIT license.
FAQs
Angular 19.x library to monitor changes to elements. Uses ResizeObserver to do the work.
The npm package ngx-resize-observer receives a total of 5,292 weekly downloads. As such, ngx-resize-observer popularity was classified as popular.
We found that ngx-resize-observer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.