-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Angular 19 changes Subscriptions to RxMethodRef #4661
Comments
@leomayer it would help us a lot of you can use our provided stackblitz to reproduce it. |
In v19, If you move class MyComponent implements OnInit {
readonly injector = inject(Injector);
ngOnInit() {
this.chatStore.startDelay4NewChatSession(
this.chatStore.isDelayInit,
{ injector: this.injector }
);
}
} There is no need to do manual cleanup because automatic cleanup will happen on component destruction. Read |
@markostanimirovic: ahhh... thx... That tiny bit of information I didn't conclude from the 'Manual cleanup' section https://ngrx.io/guide/signals/rxjs-integration#manual-cleanup |
@rainerhahnekamp I've missed that the |
Which @ngrx/* package(s) are the source of the bug?
signals
Minimal reproduction of the bug/regression with instructions
I have defined in my
signalStore
and
and in a component
Expected behavior
With Angular 18 this code works exactly as expected. I add this to
rxMethod
to my list and it will unsubcribe automatically.After upgrading I get the error message:
[UPDATE]: I've figured out that the
Subscription
is causing the problem. Therefore just a question remains:Instead of the automatic unsubscribe should I use now a
destroy
? Do they have the same effect?BTW:
RxMethodRef
is not exportedVersions of NgRx, Angular, Node, affected browser(s) and operating system(s)
"@ngrx/signals": "^19.0.0"
"@angular/compiler": "^19.0.5",
"@angular/core": "^19.0.5",
Linux
Other information
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: