Installation
Requirements
Section titled “Requirements”- An Angular app on version 22. The package declares
@angular/coreand@angular/common^22.0.0as peer dependencies. - Node.js and npm to build the library. The repository’s CI uses Node 24, and
package.jsonpinsnpm@11.20.0as the package manager.
The library has no runtime dependencies besides Angular.
Build the package
Section titled “Build the package”git clone https://github.com/Aquilabot/ngx-sse-resourcecd ngx-sse-resourcenpm cinpm run buildnpm run build runs ng build ngx-sse-resource (ng-packagr) and copies README.md and LICENSE into the output. The package ends up in dist/ngx-sse-resource.
Install it in your app
Section titled “Install it in your app”From your app’s directory, install the built folder by path:
npm install /path/to/ngx-sse-resource/dist/ngx-sse-resourcenpm records it in your package.json as a file: dependency. Rebuild the library and reinstall when you pull new changes.
Import
Section titled “Import”Everything is exported from the package root:
import { sseResource, SSE_EVENT_SOURCE, SseConnectionError } from 'ngx-sse-resource';import type { SseResource, SseResourceOptions, SseStatus } from 'ngx-sse-resource';There are no providers to register. sseResource() works in any injection context. See Quick start.
Written from the code and tests of each repository. If a page and the code disagree, the code is right and the page has a bug. Open an issue.
© 2026 Jean Carlo Benites Porras. Code samples are MIT, like the projects they come from.