MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

modules/playground/src/jsonp/app/jsonp_comp.ts:30–36  ·  view source on GitHub ↗
(http: HttpClient)

Source from the content-addressed store, hash-verified

28 people: Person[] = [];
29
30 constructor(http: HttpClient) {
31 const peopleUrl = new URL('./people.json', window.location.href).toString();
32
33 http.jsonp(peopleUrl, 'callback').subscribe((res: unknown) => {
34 this.people = res as Person[];
35 });
36 }
37}

Callers

nothing calls this directly

Calls 3

jsonpMethod · 0.80
toStringMethod · 0.65
subscribeMethod · 0.65

Tested by

no test coverage detected