Include module first
"app/app.module.ts (excerpt)"
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
@NgModule({
imports: [
BrowserModule,
// import HttpClientModule after BrowserModule.
HttpClientModule,
],
declarations: [
AppComponent,
],
bootstrap: [ AppComponent ]
})
export class AppModule {}
Now start to use in your component
" app/config/config.service.ts (excerpt)"
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
export interface Config {
heroesUrl: string;
textfile: string;
}
@Injectable()
export class ConfigService {
constructor(private http: HttpClient) { }
getPosts() {
return this.httpClient.get('https://run.mocky.io/v3/fa3dc43e-6320-4202-b5b5-dba520d00014')
.subscribe((data: Config) => this.config = {
heroesUrl: data['heroesUrl'],
textfile: data['textfile']
});
}
this.getPosts();
console.log(this.config);
}
PS.
-
Define response data by `interface Config`
-
If the url lost, you could make one on https://run.mocky.io
-
Use `.subscribe` to get the response data. <– important
Clozaril
Buy Fucidin Cream cialis professional
zithromax and pregnancy
plaquenil class action lawsuit
Prevacid Solutab Cheap
buy liquid cialis online
cialis pills for sale
zithromax z pack for sale mastercard
viagra uso recreativo
viagra price at boots
kamagra online ch jelly viagra kamagra tablets kamagra using paypal
http://alevitrasp.com NeroHods Thus normally radiopaque calciumcontaining bone appears white on an xray image.
Aecciq CXR shows widened mediastinum mm on AP view. prednisolone asthma
Ewlkma Baclofene Cp Plaquenil
Viagra Pfizer 100 Mg Beipackzettel Xekxub Plaquenil
https://extratadalafill.com/ cialis at canadian pharmacy
tadalafil 5mg buy tadalafil for sale online
stromectol 3 mg dosage cost of ivermectin medicine
stromectol pill price ivermectin 3 mg tablet dosage
ivermectin 1 ivermectin cost uk
ivermectin 18mg stromectol 3 mg tablet price
how to buy stromectol stromectol covid 19
ivermectin 2ml generic stromectol
stromectol ivermectin ivermectin buy australia
stromectol in canada stromectol cvs
stromectol 3 mg tablet price can you buy stromectol over the counter
ivermectin over the counter ivermectin brand name
ivermectin 0.5% ivermectin lotion for scabies
ivermectin tablets uk ivermectin 9 mg
cialis 5mg price comparison tadalafil natural substitute
ivermectin 9 mg ivermectin ireland
stromectol pill for humans stromectol buy uk
viagra prices viagra alternative
ivermectin 1 ivermectin cream uk
tadalafil no prescription buy tadalafil no prescription
cheap cialis cialis cost
generic viagra review what does viagra do
viagra generic canadian pharmacy buying canadian pharmacy
highest rated canadian online pharmacy Meclizine
Himplasia prescription drugs canada
cialis and levitra levitra information
cialis difficulty ejaculating 30 day free cialis
generic sildenafil cvs sildenafil 1 pill
order brand viagra online where can i get sildenafil without prescription
ivermectin for demodex gapeworm treatment ivermectin
cialis and viagra together forum cialis order
online pharmacy products herbals
tadalafil tadora 20 tadalafil 60 mg
tractor supply ivermectin tractor supply ivermectin pour on
best online pharmacy without prescriptions pharmacy canada school
cialis softtabs online difference between viagra and cialis
canadian pharmacy viagra pills buy viagra europe
brand levitra viagara cialis levitra
walgreens cialis prices cialis free trial coupon
walmart levitra levitra online cheap
online pharmacy certification online pharmacy for viagra
american online pharmacy oxford online pharmacy
rite aid pharmacy hours the canadian pharmacy review
canadian pharmacies selling cialis pharmacy technician online certification course
Theo-24 Cr canada pharmaceuticals online
canada pharmacy phone number legal canadian pharmacy
reviews canadian pharmacy history of prescription drugs
oxfordhealth online pharmacy Lincocin
cost provigil 100mg modafinil 100mg without prescription
order modafinil 200mg online order provigil 200mg for sale
online pharmacy college choice pharmacy canada
how Does Cialis Help Bph?
order modafinil 100mg online cheap generic modafinil 100mg
how Long Does It Take A 10mg Cialis To Work?
when Will Cialis Go Generic?
how Long Does A Dose Of Cialis Last?
buy stromectol pills buy ivermectin in canada
stromectol canada
stromectol for sale ivermectin without a doctor prescription
ivermectin 6 mg tablet
ivermectin pills buy stromectol canada purchase ivermectin online