MCQ PracticeSingle Best AnswerTopic: AngularJS MCQ
Q
What is dependency injection in AngularJS?
Question ID
#7752
Subchapter
AngularJS MCQ
Action
Choose one option below
Choose Your Answer
Click an option to check whether your answer is correct.
A
A way to inject CSS styles into HTML ✔✖
B
A way to inject JavaScript code into HTML ✔✖
C
A way to inject data into a component ✔✖
D
A way to inject services into a component ✔✖
D
Correct Answer: D
Explanation
Answer: D) A way to inject services into a component
Explanation: Dependency injection is a key feature of AngularJS that allows services to be injected into components, making it easy to reuse code and separate concerns.