Use this tag for questions related to Angular 2 Services, which are JavaScript functions responsible for performing a single task.
I have a Component and a Service: Component: Service: @Injectable() export class PersonService { getPersons(){ var persons: Person[] = [ {id: 1, firstName:'Hans', …
angular typescript angular2-servicesI've read questions like Access EventEmitter Service inside of CustomHttp where the user uses EventEmitter in his service, but he …
angular angular2-servicesI am trying to load an event from my API before the component gets rendered. Currently I am using my …
typescript angular angular2-services angular2-httpI've read that injecting when bootstrapping should have all children share the same instance, but my main and header components (…
angular typescript angular2-routing angular2-servicesI have new to develop Angular 4. I have facing issue while getting response from API about display image.In API,…
angular typescript angular2-servicesBy using Http, we call a method that does a network call and returns an http observable: getCustomer() { return this.…
angular rxjs angular2-services rxjs5getHeroes (): Observable<Heros[]> { return this.http.get(this.heroesUrl) .map(this.extractData) .catch(this.handleError); } Where I add …
angular2-servicesIn my Angular 2 component I have an Observable array list$: Observable<any[]>; In my Template I have <…
angular observable angular2-template angular2-servicesservice file import { Observable } from 'rxjs/Rx'; import { Http,Response} from '@angular/http'; import { Injectable } from '@angular/core'; …
angular typescript rxjs observable angular2-servicesI want to use a static variable of a component in HTML page. How to bind static variable of component …
angular typescript angular2-services