<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DI on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/di/</link><description>Recent content in DI on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 11 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/di/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 4: Services and Dependency Injection in Standalone Angular</title><link>https://ai-blog.noorshomelab.dev/angular-production-guide-2026/services-dependency-injection/</link><pubDate>Wed, 11 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/angular-production-guide-2026/services-dependency-injection/</guid><description>&lt;h2 id="introduction-to-services-and-dependency-injection"&gt;Introduction to Services and Dependency Injection&lt;/h2&gt;
&lt;p&gt;Welcome to Chapter 4! In the previous chapters, you&amp;rsquo;ve mastered the fundamentals of Angular&amp;rsquo;s standalone components, learning how to build self-contained UI pieces. But what happens when your components need to share data, perform complex logic, or interact with external resources like APIs? This is where Angular services and Dependency Injection (DI) come to the rescue!&lt;/p&gt;
&lt;p&gt;In this chapter, we&amp;rsquo;ll dive deep into how services act as powerful, reusable building blocks for your application&amp;rsquo;s business logic and data management. You&amp;rsquo;ll learn the elegant system of Dependency Injection that Angular uses to deliver these services exactly where and when they&amp;rsquo;re needed, all within the modern standalone architecture that minimizes boilerplate and maximizes clarity. By the end of this chapter, you&amp;rsquo;ll not only understand &lt;em&gt;what&lt;/em&gt; services and DI are, but also &lt;em&gt;why&lt;/em&gt; they are fundamental to building robust, testable, and maintainable Angular applications, especially in a production environment.&lt;/p&gt;</description></item><item><title>Working with Injectors and Hierarchies in Injection-JS</title><link>https://ai-blog.noorshomelab.dev/injection-js-guide-chapters/working-with-injectors-and-hierarchies/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/injection-js-guide-chapters/working-with-injectors-and-hierarchies/</guid><description>&lt;h2 id="3-working-with-injectors-and-hierarchies"&gt;3. Working with Injectors and Hierarchies&lt;/h2&gt;
&lt;p&gt;In the previous chapter, we learned about services, providers, and how to create a basic injector. Now, let&amp;rsquo;s dive deeper into how &lt;code&gt;ReflectiveInjector&lt;/code&gt; resolves dependencies and, more importantly, how to build sophisticated &lt;strong&gt;injector hierarchies&lt;/strong&gt; to manage dependencies in large, modular applications.&lt;/p&gt;
&lt;h3 id="the-role-of-reflectiveinjector"&gt;The Role of &lt;code&gt;ReflectiveInjector&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;ReflectiveInjector&lt;/code&gt; is the central component that &lt;code&gt;injection-js&lt;/code&gt; uses to resolve dependencies. When you call &lt;code&gt;injector.get(SomeToken)&lt;/code&gt;, it performs the following steps:&lt;/p&gt;</description></item></channel></rss>