ikke noget der kan forstyrre yderligere opstartsritualer i danske børnehjem.
VIP’erne har altså heller ikke til hensigt at bruge deres plads for at forstyrre andre landes børnehjem. Det ønsker de å gøre en del andre steder i landet, fremgår det af brevet.Q:
Angular2 Http in a service,'response' is undefined
I have a service, it is like below:
import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
@Injectable()
export class SearchService {
private dataUrl: string = '';
constructor(private http: Http) {
}
search(fname, lname) {
return this.http.get(this.dataUrl + '?query=' + fname + '&where=1&callback=JSON_CALLBACK');
json(r) {
return r;
jsonp(r) {
}
Whenever I call the search function, I get this error:
EXCEPTION: Uncaught (in promise): undefined is not a function TypeError:
'undefined' is not a function
However, when I go to the console, it shows the following result from the Http.get:
OPTIONS
401 Unauthorized
(index):1 GET
Related links:
Comments