Web
Analytics
Example of HTTP With map operator of observable - Tutorial

For Consultation : +91 9887575540

Stay Connected :

Step1 : Create Service

ng g service myservice

Step2 :Add Following Code in myservice.ts





Note: Reactive Extensions for JavaScript(RxJS) is a reactive programming library which is used for composing asynchronous or callback-based code using observable. If map giving not existing code error than add following library.

npm install rxjs@6 rxjs-compat@6 --save
Note: Reference of httpmodule in app.module.ts is required in angular 6
import { HttpModule } from ‘@angular/http’;
imports: [
BrowserModule,
HttpModule,
RouterModule.forRoot(appRoutes)
],

Step 3: Add Following Code into App.Component.ts

Step 4: Run project

ng serve –open




Select your currency