You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
Using a provider in the ngModule seems to work fine - the routes in the provider are available.
Converting the component into a standalone component, the same provider no longer functions. The factory isn't even called. Same for when I use route providers.
The fact that the factory is not called seems to indicate that the token was never consumed. Or was consumed before the component initialized? I also cannot use inject() directly in loadChildren as it is not supported.
This is working as expected. Routes need to be provided in the environment injector tree. Putting it in the component providers makes it available to the component but not services provided in root.
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
Using a provider in the ngModule seems to work fine - the routes in the provider are available.
Converting the component into a standalone component, the same provider no longer functions. The factory isn't even called. Same for when I use route providers.
The fact that the factory is not called seems to indicate that the token was never consumed. Or was consumed before the component initialized? I also cannot use inject() directly in loadChildren as it is not supported.
Or in routes.ts
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: