Skip to content

Commit d267177

Browse files
committed
Add change detection question
1 parent 7cf3dda commit d267177

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

README.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@
156156
|148| [What is NgUpgrade?](#what-is-ngupgrade)|
157157
|149| [How do you test Angular application using CLI?](#how-do-you-test-angular-application-using-cli)|
158158
|150| [How to use polyfills in Angular application?](#how-to-use-polyfills-in-angular-application)|
159+
|151| [What are the ways to trigger change detection in Angular?](#what-are-the-ways-to-trigger-change-detection-in-angular)|
160+
|152| [](#)|
161+
|153| [](#)|
162+
|154| [](#)|
163+
|155| [](#)|
164+
|156| [](#)|
165+
|157| [](#)|
166+
|158| [](#)|
167+
|159| [](#)|
168+
|160| [](#)|
159169

160170
1. ### What is Angular Framework?
161171

@@ -1935,4 +1945,21 @@
19351945
and create import statement in polyfill file.
19361946
```javascript
19371947
import 'web-animations-js';
1938-
```
1948+
```
1949+
151. ### What are the ways to trigger change detection in Angular?
1950+
You can inject either ApplicationRef or NgZone, or ChangeDetectorRef into your component and apply below specific methods to trigger change detection in Angular. i.e, There are 3 possible ways,
1951+
1. ApplicationRef.tick(): Invoke this method to explicitly process change detection and its side-effects. It check the full component tree.
1952+
2. NgZone.run(callback): It evaluate the callback function inside the Angular zone.
1953+
3. ChangeDetectorRef.detectChanges(): It detects only the components and it's children.
1954+
1955+
152. ### ?
1956+
153. ### ?
1957+
154. ### ?
1958+
155. ### ?
1959+
156. ### ?
1960+
157. ### ?
1961+
158. ### ?
1962+
159. ### ?
1963+
160. ### ?
1964+
1965+

0 commit comments

Comments
 (0)