Top "Angular2-services" questions

Use this tag for questions related to Angular 2 Services, which are JavaScript functions responsible for performing a single task.

calling success, error callbacks using subscribe in angular2?

Giving responce.json () is not function for my case component.ts this.AuthService.loginAuth(this.data).subscribe(function(response) { console.…

angular angular2-template angular2-services
How can create a dynamic menu in angular 2?

I need to create a dynamic menu after user logged in successfully and redirected to home page using Angular 2. Exactly …

angular angular2-template angular2-services
Type 'ElementRef' is not generic

I am working with a project using Material Component in Angular 5. I did update my Visual code but I don't …

angular angular5 angular2-template angular2-forms angular2-services
Get current value of Subject.asObservable() inside Angular service

I want to write a simple toggle inside an Angular2 service. Therefore I need the current value of a Subject …

typescript angular rxjs angular2-services subject
How to fix Angular 2 `Uncaught (in promise): TypeError: Cannot read property 'query' of null`?

I've been using the Heroes tutorial in the Angular 2 docs to experiment. However, I've come to a point that I …

angular angular2-services
Angular2: Convert XML to JSON

I wanted to convert the XML I received from Web API response to JSON in Angular 2. The application is developed …

angular typescript angular2-services angular2-nativescript
Using multiple instances of the same service

I have a service, like this: @Injectable() export class EditorService { ... } And I have a component, like this: @Component({ ... template: `<…

angular angular2-services
How to subscribe to event emitter once?

// Part of service public someEvent: EventEmitter<number> = new EventEmitter(); .... // Component @Component({ selector: 'some-component', template: `...` }) export class SomeComponent { constructor(…

angular rxjs eventemitter angular2-services rxjs5
Why we should use RxJs of() function?

in service section of angular.io tutorial for angular2 I hit a method named of.for example : getHeroes(): Observable<…

javascript angular service rxjs angular2-services
Angular 2 Component listen to change in service

I've a simple question about change detection. I have a component and a (global) service with a boolean inside. How …

angular angular2-services angular2-changedetection