Skip to content

Commit 67b8e37

Browse files
authored
Update README.md
1 parent dac58ee commit 67b8e37

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
<details>
44

5+
<summary><strong>Angular Dependency Injection</strong></summary>
6+
7+
### Why use Inject instead of DI with the Constructor ?
8+
Ans. This is class-based injection — Angular automatically provides the service instance when the component (or directive, or service) is created.
9+
✅ Works great for components, directives, pipes, and services.
10+
❌ But only works inside class constructors.
11+
If you want to use a service in a function, effect, or utility file, you can’t — because there’s no class context.
12+
13+
</details>
14+
15+
<details>
16+
517
<summary><strong>How performace is increased from Angular 2 to Latest</strong></summary>
618

719
Let’s go deep into how Angular’s performance improved — from Angular 2 → Angular 19 (2025) — across rendering, build, memory, SSR, and runtime execution.

0 commit comments

Comments
 (0)