-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Bug: @newInstance() becomes container default instance if it's the first instance #197
Comments
Hmm, interesting, thanks and sorry for the wait @krisdages this' been missed. I'm not sure if you are still interested, but I'll just comment for anyone who is //only difference is the order of the gets.
const newLogger = container.get(NewInstance.of(Logger));
const logger = container.get(Logger);
const container = new Container();
const newLogger = container.get(NewInstance.of(Logger, false)); // do not register
const logger = container.get(Logger); Though this probably will need to wait for someone who actually needs the behavior. |
I'm submitting a bug report
1.5.2
This is a regression from v1.4.2, where this worked correctly. I tried to implement the same test for that version, but had issues getting everything to build and run for that tag. The new TS repo structure and scripts are much appreciated. :)
Please tell us about your environment:
Operating System:
Linux (Ubuntu 18.04)
Node Version:
10.16
N/A
N/A
Browser:
all
Language:
all
Current behavior:
https:/krisdages/aurelia-dependency-injection/tree/bugtest/new-instance-injects-default
Expected/desired behavior:
Both tests should pass.
clone or checkout https:/krisdages/aurelia-dependency-injection
git clone https:/krisdages/aurelia-dependency-injection git checkout bugtest/new-instance-injects-default npm install npm run test
What is the expected behavior?
What is the motivation / use case for changing the behavior?
This is a regression from version 1.4
The text was updated successfully, but these errors were encountered: