Components that are designed to be reusable across multiple parts of an application often implement the _____ lifecycle hook to do cleanup work.
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
Components that are designed to be reusable across multiple parts of an application often implement the ngOnDestroy lifecycle hook to do cleanup work, like unsubscribing from observables.
Loading...
Related Quiz
- In an Angular application, how can you optimize a component to be checked only once by Angular's change detection mechanism?
- How can you create a custom operator in RxJS?
- To execute the Observable and start emitting values, you need to call the _____ method.
- How can you navigate to a different route using Angular's router?
- How do you isolate and test a single component without affecting the actual application in Angular?