Why does dependency injection appear at the front end, and in what scenarios will it be used?

Sorry, the comprehension is poor. I can understand the back-end dependency injection a little, but I really can"t understand it with the same concept at the front end. I can"t think of a suitable scenario. Please help me explain it. Thank you very much

.

there is also a scenario in which one class depends on another, and it is very common. At this time, using dependency injection looks much better than new N classes.


dependency injection is a design idea, and it has nothing to do with front-end and back-end

.
Menu