Angular Flashcards

1
Q

✅ Explain Hot and cold observables

A

N/A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

✅ 8 building blocks

A

Module, Components, Templates, Directives, Data-binding, Decorators, Services, Routing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

✅ What is ChangeDetection?

A

Default, onPush, ChangeDetectionRef

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

✅ Observable Callback methods (3)

A

next, error, complete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

✅ Important things the router does? (4)

A

URL Structure Lazy loading Guards Redirects / Navigates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

✅ Event binding vs Property Binding vs Interpolation

A

N/A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

✅ What is ngZone?

A

runOutsideAngular run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

✅ What is an interceptor?

A

next.handle()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

✅ JIT vs AOT

A

N/A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

✅ Types of directives (2)

A

Structural and Directives

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

✅ Component LifeCycle hook

A

ngOnChanges ngOnInit ngDoCheck ngAfterContentInit ngAfterContentChecked ngAfterViewInit ngAfterViewChecked ngOnDestroy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

✅ Explain @ViewChild

A

to find first HTML element matching the selector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

✅ Differences: Observables vs Promises (4)

A

Multiple values - Single value Lazy - Not Lazy Cancellable vs Not cancellable Observable has rxjs operators.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

✅ Custom Two-way binding VS ngModel

A

ngModel for native elements. custom two-way binding: eg. Input - size Output - sizeChanged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

✅ Types of subjects

A

Subject BehaviorSubject ReplaySubject AsyncSubject

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

✅ Constructor (1) vs (2) ngOnInit

A

Constructor - Inject services ngOnInit - Initialize values - service calls

17
Q

✅ 6 ways to debug

A

1 - F12 > source > breakpoint on files 2 - debugger; statement 3 - tap on rxjs 4 - redux devtools for ngrx 5 - custom logger 6 - visual studio code extensions

18
Q

✅ ViewEncapsulation

A

N/A

19
Q

✅ ng-content

A

N/A

20
Q

⚠️Reactive Forms vs TemplateDriven

A

⚠️

21
Q

✅ How to prevent memory leaks? (2)

A

Use Async pipe and kill every subscription

22
Q

✅ Angular Tree Shaking

A

N/A

23
Q

✅ How to improve the performance of an Angular App? (8)

A

1- Cache
2 - memoization
3- Use onPush and detach Change detection
4- Lazy loading
5- Update your angular App and CLI
6 - AOT
7. Compress images
8 - Reduce amount of round-trips to the server (http calls)

24
Q

✅ What is Memoization?

A

if the function is called with the same inputs,
we directly return the result in the cache

25
Q

✅ What is Angular Universal?

A

Server-Side Rendering (SSR) with Angular

26
Q

✅ How many rxjs operators?

A

More than 100