angular2-observables Questions
2
Solved
I have a service which communicate to a third party service.
The service is executed by several components in the application. I would like to be notified in a generic notification component whenev...
Plotter asked 5/3, 2019 at 4:58
1
Solved
I'm trying to get the JSON using HttpClient in Angular 7. The code works fine but I'm trying to implement the commented lines to get the data directly from the API url and stop using the const IMAG...
Nonexistence asked 26/1, 2019 at 5:43
2
Solved
How to detect an error by timeout operator? I would like to show an alert or something like that just when the server doesn't response.
I have a similiar code in my interceptor:
this.http.post('h...
Nephogram asked 10/11, 2018 at 1:49
2
Solved
I am trying to get result from a zipped array of observables themselves zips of array of simple observables. As follows:
a(x) {
const observables = [of(x), of(x+1)];
return zip(observables);
}
...
Deci asked 3/11, 2018 at 21:24
5
Solved
What's the preferred way to create an observable from a button's onclick event using Angular 2?
I'm not sure if it's considered best practice to grab the native element from the DOM in the compone...
Danika asked 12/6, 2016 at 2:42
2
Solved
I have a component in angular 2 which responds to changes in the route parameters (the component doesn't reload from scratch because we're not moving out of the main route. Here's the component cod...
Transfuse asked 26/10, 2016 at 12:54
2
Solved
I am performing a sign-up action and in my backend when the user successfully registers I return his id e.g. "105" and when the register fails (user already exists) I return "USER_EXISTS". I have c...
Elastin asked 17/8, 2018 at 17:22
0
I have defined a behavior subject:
component.ts
bsub1: BehaviorSubject<Array<any>> = new BehaviorSubject(null);
And called next() on it:
html:
<button (click) = getData()>Da...
Juliannejuliano asked 3/8, 2018 at 13:6
6
Solved
EDIT: Updated Plunkr: http://plnkr.co/edit/fQ7P9KPjMxb5NAhccYIq?p=preview
this part works:
<div *ngFor="let entry of entries | async">
Label: {{ entry.label }}<br>
Value: {{ entry.v...
Hernandes asked 16/8, 2016 at 20:20
2
Is there a better way using RxJS operators to loop over an array returned from an observable than this to emit a new individual ListingItem?
onGetItemData(){
this.dataService.getItemData().subscri...
Characteristically asked 27/7, 2018 at 0:26
2
Solved
I am trying to learn reactive programming using RxJS. I was trying to create an observable from an array using Observable.from() method, but I am getting an error:
Property 'from' does not exist...
Disband asked 29/10, 2017 at 17:25
3
Solved
In my angular 2 app I have a service that uses the Observable class from the rxjs library.
import { Observable } from 'rxjs';
At the moment I am just using Observable so that I can use the toPro...
Kaffraria asked 21/2, 2017 at 20:7
1
We've been having some serious problems with the recent changes to how AngularFire treats objects/lists and referencing the objects throughout our app.
The primary thing is how the old AngularFir...
Leaseback asked 4/11, 2017 at 20:7
2
Solved
I am writing an Angular 4 application using HttpClient that displays movie show times. There are 2 JSON files where the data is located: showtimes.json and movies.json.
// showtimes.json
[{
"id":...
Hazaki asked 23/2, 2018 at 23:40
1
I'm using observables in Angular 2 final with Angular-cli.
Angular 2.0.0 final
angular-cli: 1.0.0-beta.15
node: 6.3.0
Mac os: el capitan
Dependencies in package.json:
"dependencies": {
"@an...
Tonita asked 23/9, 2016 at 9:32
2
Solved
What is the difference between the following two observable mappings?
(if something in the following code appears strange to you: it stems from a learning-by-doing hobby project; I still learn RxJ...
Hum asked 25/1, 2018 at 22:7
4
Solved
I am having some troubles making nested Observable calls. By that I mean a call to a http service that retrieve a user, then getting the id from the user to make another http call, and finally rend...
Taeniafuge asked 24/11, 2016 at 13:51
4
Solved
Parent and children communicate via a service example from the official guide on Angular.io makes use of dollar signs in Observable stream names.
Notice missionAnnounced$ and missionConfirmed$ in t...
Mallette asked 7/6, 2016 at 6:7
2
Solved
I have a UsernameService that returns an observable which contains a json object. In AnotherService, I want to inject a value from the UsernameService object.
So far, I am able to subscribe to the...
Semblance asked 18/10, 2017 at 6:29
1
Solved
I need help as I am a bit lost right now. So, I have a component that dynamically injets a child component into its template using componentFactoryResolver , here is my HTML
<div class="dialog...
Distichous asked 29/9, 2017 at 10:49
3
Solved
I am having trouble figuring out an issue with an angular 4 preflight request not passing a CORS access-control check: “No 'Access-Control-Allowed-Origin'”. I am able to successfully get data from ...
Loiseloiter asked 16/9, 2017 at 3:33
1
Solved
I am kind of new to Angular 4 and Observables and everything related to it.
I am trying to execute two http requests one after another (only when the first one succeeds).
I'm using this code:
pub...
Legumin asked 28/8, 2017 at 13:22
2
Solved
Tried to make a simple timer and need to break it on some if condition. But always got an error EXCEPTION: timer.unsubscribe is not a function.
What am I doing wrong?
let timer:any = Observable....
Gumwood asked 21/10, 2016 at 16:10
1
Solved
I am writing angular2 application with interval timers implemented via RxJs observables, and just noticed the strange behaviour of Observable.interval() and Observable.timer() in Chrome browser whe...
Groupie asked 27/7, 2017 at 12:48
2
Solved
From my understanding of Angular and RxJs there are two ways to terminate Observables. You can unsubscribe() from them or use takeUntil() and complete(). Below are examples of each approach (in pse...
Rockie asked 26/7, 2017 at 17:37
© 2022 - 2024 — McMap. All rights reserved.