Unable to resolve function map(). I also tried importing rxjs/add/operator/map
getVenues() {
if (this.placeValue != null && this.placeValue != "" && this.recipeValue != null && this.recipeValue != "") {
this._http.get("https://api.foursquare.com/v2/venues/search" +
"?client_id=3PPNMTIKJJNDVYPFOBGSHHV2PR5A2P05PYHXDN2MKSKTTBSX" +
"&client_secret=0QPHT0F5RS043F4TB4KKPQSHKSAXKE5ZNOYGB5KL2MBDYAG4" +
"&v=20160215&limit=5" +
"&near=" + this.placeValue +
"&query=" + this.recipeValue)
.map(res => res.json())
.subscribe(data => {
// we've got back the raw data, now generate the core schedule data
// and save the data for later reference
this.data1 = data.results[0].key;
console.log(this.data1)},
err => console.log(err)
);
If I use HttpClientModule instead of HttpClient, I get the error
Unable to resolve method get()
promisealso