This repository was archived by the owner on Sep 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
Two instances of the same service #495
Labels
Comments
Side note : For now I've resolved this "issue" by using the factory keyword with something like this :
|
Hi @alescdb thanks for asking and the details provided. Anything you put in the Does your |
Indeed, the service was defined into both components Thanks ! |
I'll try to document this as part of #465. Cheers! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When a service is use on the same "page" by two components, we have two differents instances of the same service, this does not seems to be a normal behaviour.
In Angular 2 (ts), I do not have the same behaviour.
Note that I've tried adding the class to bootstrap() but it does not make a difference.
Example :
If we take the stater project of IntelliJ (I think it's https://github.com/google/stagehand)
and change AppComponent to this :
And change the ngOnInit() in TodoListComponent to this :
The output will look like this :
Using Dart : 1.24.2
pubspec.yaml
The text was updated successfully, but these errors were encountered: