-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Information
Events source code contains an example of how Events can be used outside of a store:
platform/modules/signals/events/src/events-service.ts
Lines 62 to 72 in 7819972
| * \@Component({ /* ... *\/ }) | |
| * class Counter { | |
| * readonly #events = inject(Events); | |
| * | |
| * constructor() { | |
| * this.#events | |
| * .on(increment) | |
| * .pipe(takeUntilDestroyed()) | |
| * .subscribe(() => /* handle increment event *\/); | |
| * } | |
| * } |
It may be a good idea to include it in documentation as well, because it is not immediately obvious you can do this.
Documentation page
No response
I would be willing to submit a PR to fix this issue
- Yes
- No
Metadata
Metadata
Assignees
Labels
No labels