{"id":27992858,"url":"https://github.com/vdolek/angular-resize-event","last_synced_at":"2025-05-08T18:43:20.825Z","repository":{"id":29237892,"uuid":"117224824","full_name":"vdolek/angular-resize-event","owner":"vdolek","description":"Angular directive for detecting changes of an element size.","archived":false,"fork":false,"pushed_at":"2024-01-01T22:44:53.000Z","size":2367,"stargazers_count":171,"open_issues_count":37,"forks_count":63,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-25T10:06:38.535Z","etag":null,"topics":["angular","resize","resize-event"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdolek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-12T09:58:37.000Z","updated_at":"2025-01-06T13:41:25.000Z","dependencies_parsed_at":"2024-06-18T12:40:13.949Z","dependency_job_id":"0a25517e-1f3e-4fe8-b052-5f5ec8127b39","html_url":"https://github.com/vdolek/angular-resize-event","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdolek%2Fangular-resize-event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdolek%2Fangular-resize-event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdolek%2Fangular-resize-event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdolek%2Fangular-resize-event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdolek","download_url":"https://codeload.github.com/vdolek/angular-resize-event/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253131887,"owners_count":21859089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","resize","resize-event"],"created_at":"2025-05-08T18:43:20.108Z","updated_at":"2025-05-08T18:43:20.819Z","avatar_url":"https://github.com/vdolek.png","language":"TypeScript","readme":"# Angular Resize Event\n\n[![github version](https://img.shields.io/github/package-json/v/vdolek/angular-resize-event/master?label=github)](https://github.com/vdolek/angular-resize-event)\n[![npm version](https://img.shields.io/npm/v/angular-resize-event)](https://www.npmjs.com/package/angular-resize-event)\n[![build status](https://img.shields.io/github/workflow/status/vdolek/angular-resize-event/CI/master)](https://github.com/vdolek/angular-resize-event/actions?query=workflow%3ACI)\n[![downloads](https://img.shields.io/npm/dt/angular-resize-event)](https://www.npmjs.com/package/angular-resize-event)\n[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/vdolek/angular-resize-event)](https://snyk.io/test/github/vdolek/angular-resize-event)\n\nAngular 14 directive for detecting changes of an element size.\n\nIt is as simple as:\n\n```html\n\u003cdiv (resized)=\"onResized($event)\"\u003e\u003c/div\u003e\n```\n\nIt internally uses browser native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver). Therefore it is not supported in IE.\n\nFor Angular 11 you can use version 2.1.0 which internally uses uses `ResizeSensor` from [CSS Element Queries](https://github.com/marcj/css-element-queries) that is supported in IE.\n\n## Playground\n\n[StackBlitz playground](https://stackblitz.com/edit/angular-resize-event-playground?file=src/app/app.component.html)\n\n## Using the library\n\nImport the library in any Angular application by running:\n\n```bash\n$ npm install angular-resize-event\n```\n\nand then from your Angular `AppModule`:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\n\n// Import the library module\nimport { AngularResizeEventModule } from 'angular-resize-event';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n\n    // Specify AngularResizeEventModule library as an import\n    AngularResizeEventModule\n  ],\n  providers: [],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { }\n```\n\nOnce your library is imported, you can use its `resized` directive in your Angular application:\n\n```html\n\u003cdiv (resized)=\"onResized($event)\"\u003e\u003c/div\u003e\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n// Import the resized event model\nimport { ResizedEvent } from 'angular-resize-event';\n\n@Component({...})\nclass MyComponent {\n  width: number;\n  height: number;\n\n  onResized(event: ResizedEvent) {\n    this.width = event.newRect.width;\n    this.height = event.newRect.height;\n  }\n}\n```\n\n## License\n\nMIT © [Martin Volek](mailto:martin@vdolek.cz)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdolek%2Fangular-resize-event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdolek%2Fangular-resize-event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdolek%2Fangular-resize-event/lists"}