Question 16
Which of these classes are extended by the EventEmitter classes in Angular6 to send arbitrary values to the emit method?
Observable
0 Iterable
Delegate
O Listener
Reset
Save
Answers
Answer:
know if there are mad or upset people in present and
Answer:
Observable is the classes are extended by the EventEmitter classes in Angular6 to send arbitrary values to the emit method
Explanation:
A function that generates an observer and links it to the source where values are anticipated, such as clicks, mouse events from DOM elements, or an HTTP request, is known as an observable.
An object having callback functions is termed an observer when an observable is interacted with, such as when a button is clicked, an HTTP request is made, etc.
Below is the code of implementation:
import { Observable } from 'rxjs';
var observable = new Observable(
function subscribe(subscriber) {
subscriber.next("My First Observable")
}
);
Implement Observable:
When an observable is subscribed, it is performed. An object with three methods that receive notifications is an observer.
Next() - sends values such as a number, string, object, etc.
complete() — This method marks the observable as finished while sending no values.
error() − Any errors will be sent using this technique.
#SPJ3