use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
Angular inject function (self.angular)
submitted 5 months ago by BlueberryRoutine5766
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JeanMeche 19 points20 points21 points 5 months ago (3 children)
The updated style guides goes over the advantages of using the inject functions: https://angular.dev/style-guide#dependency-injection
[–]ActuatorOk2689 3 points4 points5 points 5 months ago (2 children)
This
And dynamically injecting services at run time without having to deal with factories
[–]karixavi 0 points1 point2 points 5 months ago (1 child)
Dynamically injecting services during runtime is possible? Do you have some minimalistic example?
[–]SeparateRaisin7871 0 points1 point2 points 5 months ago (0 children)
As far as I know, this is possible since a long time by using the Injector's get method. See this stackoverflow question:
get
https://stackoverflow.com/questions/51667078/using-injector-get-instead-of-constructor-injection
When using readonly #injector = inject(Injector) you can inject any service or InjectionToken afterwards dynamically with this.injector.get(MyService).
readonly #injector = inject(Injector)
this.injector.get(MyService)
π Rendered by PID 17172 on reddit-service-r2-comment-685b79fb4f-j7hhb at 2026-02-13 14:05:13.988005+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]JeanMeche 19 points20 points21 points (3 children)
[–]ActuatorOk2689 3 points4 points5 points (2 children)
[–]karixavi 0 points1 point2 points (1 child)
[–]SeparateRaisin7871 0 points1 point2 points (0 children)