Angular Interview questions


Total available count: 96
Subject - JavaScript Frameworks
Subsubject - Angular

What is an observable?

An Observable is a unique Object similar to a Promise that can help manage async code. Observables are not part of the JavaScript language so we need to depend on a popular Observable library called RxJS. The observables are created using the new keyword.

Let see the simple example of observable,

import { Observable } from 'rxjs';

const observable = new Observable(observer => {
  setTimeout(() => {
    observer.next('Hello from an Observable!');
  }, 2000);
});

 




Next 5 interview question(s)

1
What is subscribing?
2
What is RxJS?
3
How do you perform Error handling?
4
How can you read full response?
5
Explain on how to use HttpClient with an example?