Dependency Injection (DI) एक मूल NestJS pattern हो जहाँ framework ले स्वचलित रूपमा बनाएर र प्रदान गर्छ जुन dependencies एक class लाई चाहिन्छ, constructor मा class आफै बनाउनु भन्दा। तपाईंले constructor मा आवश्यक कुरा declare गर्नुहुन्छ, र NestJS ले यो supply गर्छ — जसले loosely-coupled, testable code मा नेतृत्व गर्छ।
Constructor मा कसरी declare गर्न्छ
()
{
() {}
}
