Why might you use a Subscription in an Angular application?
- To create Observables
- To define component behavior
- To make HTTP requests
- To manage memory leaks
You would use a Subscription in an Angular application to manage memory leaks by unsubscribing from Observables when they are no longer needed. This helps prevent memory consumption issues.
Loading...
Related Quiz
- How can a parent component communicate with a child component without using @Input or @Output?
- Karma can automatically watch your files for changes and re-run tests using the _____ configuration option.
- How can you retrieve query parameters and fragments in addition to route parameters using Angular's router?
- In Angular, to manually control the emission of values in an Observable, you can use a _____.
- Which Angular class is commonly used to programmatically create form controls in a dynamic form?