Angular యొక్క DI సోపానక్రమ: ఇంజెక్టర్లు component/module చెట్టును ప్రతిబింబించే చెట్టును ఏర్పరుస్తాయి. ఒక component ఆధారపడటను అభ్యర్థించినప్పుడు, Angular ఒక ప్రదాతను కనుగొనే వరకు ఇంజెక్టర్ చెట్టు పైకి నడుస్తుంది — ఇది మీరు ఒక భాగస్వామ్య singleton లేదా component కు ప్రతి తాజా ఇన్స్టాన్స్ను పొందుతున్నారో అని నియంత్రిస్తుంది.
ఇంజెక్టర్ సోపానక్రమం
Root injector (app-wide) ← providedIn: 'root' lives here (one singleton)
└─ Module/Route injectors
└─ Component injector ← providers: [...] in @Component
└─ Child component injector
