This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
InjectPromise #91
Comments
Preferably with ES5 :-) |
https://github.com/angular/di.js/blob/master/src/injector.js#L187 << it doesn't look like you can mix synchronous with asynchronous :( (But admittedly I don't know) |
I was hoping to do something like: di.annotate(AppHandler, new di.Inject(Navigation), new di.InjectPromise(SomeAsyncLoadedModelObject)); |
Ahh I figured it out. Need two calls to di.annotate. |
No I'm not certain why its useful to use InjectPromise if I can just return a promise call myself? |
It appears that @ProvidePromise also gives it a transient scope instead of making it a singleton? |
This module needs some serious documentation |
I ended up creating my own module, though heavily inspired by angular,di. I've removed the concept of providers as it was too verbose. Check it out, and let me know if its useful. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
How does InjectPromise work? Can it be used in tandem with Inject?
The text was updated successfully, but these errors were encountered: