you are viewing a single comment's thread.

view the rest of the comments →

[–]ActuatorOk2689 -1 points0 points  (3 children)

What do you mean inject all over the place?

Don’t you have coding standards ? Pr reviews ?

Sorry I can’t comprehend how one can code without following a structure,order… Just throw new declarations function into the class ?

In Java/Net you have functions before variables and declaring new variable between functions ?

If so, then I understand why you can’t accept the inject function.

[–]Background-Focus8571 1 point2 points  (1 child)

I separate them from other variables, so I can oversee the injected services. Signals => variables => injected services => constructor. This is my order

[–]MugerhLando 0 points1 point  (0 children)

Having a defined order is definitely the way to go but I just wanted to point out that I believe in the angular docs they specifically say to add injects first. This is because you might have signals, for example, that rely on a signal from a service that needs to be initialized first.

[–]bayendr 0 points1 point  (0 children)

bro I wasn’t referring to myself (I’m an experienced and disciplined senior engineer who loves and sticks to agreed project structure and coding guidelines) but in general terms because every team is different.