First Angular app running Angular 5.
I am running an http get against my web server. Here's the code:
loadSettings() {
console.log("loadSettings() from:" + this.pizzaSettingsUrl);
this.http.get<string[]>(this.pizzaSettingsUrl, {headers: this.headers})
.pipe(
tap(settings => this.processSettingsDictionary(settings)),
catchError(this.handleError("pizzaSettings", {}))
);
}
processSettingsDictionary(settings) {
console.log("processSettingsDictionary()");
console.log(JSON.stringify(settings));
this.drinks = settings.drinkType;
this.drinkSizes = settings.drinkSize;
this.pizzaSizes = settings.pizzaSize;
this.breads = settings.sandwichBreadType;
this.sides = settings.sideType;
this.toppings = settings.topping;
}
The log "loadSettings() from:" is running with the correct url. When I copy and paste the URl from the console into a curl and run it it hits my webserver.
The this.http.get, however, is not hitting my server and I'm not getting any errors in the log. There's also nothing on my network tab indicating anything went out.
Can you see what I'm doing wrong?