RxJS Operators In 🖲️ Angular

In this blog, I'm going to explore the use of RxJS operators. As a beginner developer, we hear a lot about Promise/Observables/Subscription to call asynchronous services and perform data operations using traditional means, such as - loops, custom property mapper, and class models and so on. Instead, we can use various RxJS operators which are very easy and simple to write. In this blog, I will be demonstrating some of the real-time use cases of our day to day work and handling complex response in an easy way.

of() is used for converting the string/objects to Observables.
  1. ngOnInit() {    
  3.     const employee = {    
  4.       name: 'Rajendra'    
  5.     };    
  6.     const obsEmployee: Observable<any>  = of(employee);    
  7.     obsEmployee.subscribe((data) => { console.log(data); });    
  9.   }    

Up Next
    Ebook Download
    View all
    View all