-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[FR] APP_BASE_HREF useFactory Promise Support #25932
Comments
@Halfist ... |
@mlc-mlapis, this is pretty much the same. |
@Halfist ... how so when |
@Halfist ... OK, I can see now. So you have to use some |
@Halfist ... just for curiosity ... what is printed when you inject
|
@mlc-mlapis, I just figured out that the requested feature won't help me at all. The irony is that I need to get base path from AJAX request in |
@Halfist ... OK. |
Though, it could be helpful for other scenarios. Let it remain opened then. |
Here's another use case, when supporting promises in
Which seems like a hack, especially when APP_INITIALIZER is used specifically for app initialization, but you can't use it in this particular case. The same issue is described here: https://stackoverflow.com/questions/46190280/angular-2-set-app-base-href-with-a-value-from-a-promise-observable |
Is there any progress about that? This strongly limits our use-case as we want to have base app href dynamically configurable. Thanks. |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
APP_BASE_HREF
useFactory
doesn't support promises, only values.Expected behavior
APP_BASE_HREF
useFactory
supports both values and promises.What is the motivation / use case for changing the behavior?
In my application I need to set
APP_BASE_HREF
asynchronously. Unfortunately,APP_BASE_HREF
useFactory
doesn't support promises. So, I tried this approach withAPP_INITIALIZER
, but failed as well as OP, because it seems like if you do AJAX requests inAPP_INITIALIZER
useFactory
, you should setupAPP_BASE_HREF
first.APP_INITIALIZER
supports promises inuseFactory
, so it would be very useful ifAPP_BASE_HREF
supports them too.Environment
The text was updated successfully, but these errors were encountered: