Questions tagged as 'observable'

2
answers

Angular - Difference between Observable and Promise

I understand that an Observable is a promise but with filters to be able to make asynchronous calls without having to make many requests. I think I understand the concept but I do not have it clear in practice. In addition to a word search...
asked by 01.06.2017 / 06:23
1
answer

Difference between then, observable and subscribe

I have seen some codes where the functions of then , observable , and subscribe are used. I'm not sure but I think that all are doing the same, I would like to know with an example if it is possible what is the difference betw...
asked by 12.06.2018 / 17:23
2
answers

In C ++ 11 I have a problem using interfaces. error: no matching function for call to 'MyClass :: MyClass (Observee (&) ())'

I am programming a listener (Observer) in C ++ version 11 and if I do a new project I do not have problems doing some simple classes. But when I incorporate these classes into my main project, it gives me some errors that I do not know how to so...
asked by 27.10.2017 / 11:52
2
answers

How to return an observable in Angular 2

I have the following problem, I have several controls that subscribe to an http service that returns the data of a project according to the project code, calls of this type: this.proyectosService.getByCodigo('xxx').subscribe(response => {...
asked by 02.08.2017 / 23:35
1
answer

Problem with observables in angular2

Hello, how could I do the following, I have a ListComponent component that serves as a template. At the end I have ListComponent1 and ListComponent2, which is passed by input different options (type of menu if it is menuPrincipal, authentication...
asked by 13.04.2017 / 23:08
2
answers

Get the return value of a subscribe

I am using an Apirest and I have configured a .service file in Angular with Observables. I need to get the value that the subscribe returns to be able to return it with a return but it always throws the return before I finish the http.service...
asked by 03.01.2019 / 15:05
2
answers

Problem with ngIf and subscribe in Angular

I'm having problems updating the value of a variable within a subscribe to decide whether or not to show a div in the template. The idea is that if the credentials of a user are not correct and the HTTP response of the server is not 200 OK a div...
asked by 24.07.2018 / 18:30
1
answer

Convert an observable to a local array

Save the value of the observable array in a local array and use it to add more users, since the remote server link it does not allow to edit the data, it is test. user.component.ts users: User[]; getUsers() { return this.userService....
asked by 26.06.2018 / 14:50
1
answer

Obtain data from an Observable

I have been studying a bit about the Observables in Typescript, specifically in Ionic 3, I understand that to be able to read the data of an Observable I must subscribe to it, but until now I have only been able to use the data within the subscr...
asked by 09.02.2018 / 17:02
1
answer

Problem with the Observables

I have a problem, when presenting the data in the view with ionic 2. ** This is the function of my service ** getUsers():Observable<any>{ return this.http.get('https://jsonplaceholder.typicode.com/posts').map((datos) => datos....
asked by 21.02.2018 / 18:01