{"id":28835733,"url":"https://github.com/odonno/ng-intersection-observer","last_synced_at":"2026-05-18T09:33:47.726Z","repository":{"id":57749137,"uuid":"523707047","full_name":"Odonno/ng-intersection-observer","owner":"Odonno","description":"Intersection Observer for Angular","archived":false,"fork":false,"pushed_at":"2023-02-05T17:32:16.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-27T11:52:52.971Z","etag":null,"topics":["angular","directive","intersection-observer","intersectionobserver"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ng-intersection-observer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Odonno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-11T12:02:02.000Z","updated_at":"2022-12-30T11:47:41.000Z","dependencies_parsed_at":"2023-02-19T00:46:05.064Z","dependency_job_id":null,"html_url":"https://github.com/Odonno/ng-intersection-observer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Odonno/ng-intersection-observer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2Fng-intersection-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2Fng-intersection-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2Fng-intersection-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2Fng-intersection-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Odonno","download_url":"https://codeload.github.com/Odonno/ng-intersection-observer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2Fng-intersection-observer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260730407,"owners_count":23053640,"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","directive","intersection-observer","intersectionobserver"],"created_at":"2025-06-19T10:10:47.884Z","updated_at":"2026-05-18T09:33:47.688Z","avatar_url":"https://github.com/Odonno.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-intersection-observer\n\nIntersection Observer for Angular\n\n## Get started\n\n```\nnpm install ng-intersection-observer --save\n```\n\nOnce everything is installed, you need to add the module into your own module.\n\n```ts\nimport { IntersectionObserverModule } from 'ng-intersection-observer';\n\n@NgModule({\n    ...,\n    imports: [\n        IntersectionObserverModule\n    ],\n    ...\n})\nexport class AppModule { }\n```\n\n## How to use?\n\nYou can then use the directive inside your components.\n\n```html\n\u003cdiv #container\u003e\n  \u003cdiv\n    observeVisibility\n    [observeVisibilityRoot]=\"container\"\n    [observeVisibilityThreshold]=\"0\"\n    (visible)=\"onVisible()\"\n    (hidden)=\"onHidden()\"\n  \u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou will have the possibility to configure the observer with the following params:\n\n- `observeVisibilityRoot` - the root container used - to see if the element is visible (`Document` by default)\n- `observeVisibilityRootMargin` - the margin applied to the root container to detect visibility (`0` by default)\n- `observeVisibilityThreshold` - the threshold level to detect when the element should be considered visible or hidden (`0` by default)\n\nAnd then by observing the intersection, you can listen to the following events:\n\n- `visible` - when the element become visible inside the root element\n- `hidden` - when the element is now hidden\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodonno%2Fng-intersection-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodonno%2Fng-intersection-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodonno%2Fng-intersection-observer/lists"}