angular2-observables Questions
2
Solved
Seemingly out of the blue I am getting errors with RxJS.
My project is Angular, Typescript and I use RxJS as part of NGRX redux.
My code seemed to work absolutely fine with just this as an import...
Krypton asked 4/9, 2017 at 10:36
18
Solved
I am trying to build a simple blog with Angular 2 and Firebase and I am having issues using async pipe in a component. I get the error in the console.
zone.js:344Unhandled Promise rejection: Templ...
Jaxartes asked 21/9, 2016 at 19:47
8
Solved
Using Angular 4.3.1 and HttpClient, I need to modify the request and response by async service into the HttpInterceptor of httpClient,
Example for modifying the request:
export class UseAsyncServ...
Frohman asked 27/7, 2017 at 8:30
5
Solved
I'm working on an angular project, I have a situation where making a call to backend using an observable to fetch products.
Here is how the code looks like.
getProducts () : Product[] {
this.http.g...
Counterword asked 24/4, 2022 at 14:43
4
Solved
Hi I have a observable user$ with a lot of properties (name, title, address...)
component{
user$:Observerable<User>;
constructor(private userService:UserService){
this.user$ = this.userSe...
Herriot asked 10/4, 2017 at 14:24
8
Solved
I've been looking to understand those 3:
Subject
BehaviorSubject
ReplaySubject
I would like to use them and know when and why, what are the benefits of using them and although I've read the docum...
Chug asked 30/3, 2017 at 13:5
4
Solved
Let's say I have a component that subscribes to a service function:
export class Component {
...
ngOnInit() {
this.service.doStuff().subscribe(
(data: IData) => {
doThings(data);
},
(...
Malvoisie asked 10/10, 2016 at 14:4
1
Solved
In my project, I use BehaviorSubjects as data stores to store the state of my application.
I need only the current value that is currently held in the BehaviorSubject store, and don't need to subsc...
Corse asked 11/4, 2022 at 6:37
7
Solved
comment.component.ts:
import { Component, OnInit } from '@angular/core';
import { Router} from '@angular/router'
import { Comment } from 'comment entity path'
import {CommentService} from 'comment...
Foretoken asked 16/3, 2017 at 3:23
5
Solved
I am new to angular and I have the following situation which is I have a service getAnswers():Observable<AnswerBase<any>[]>and two components that are related to each other.
online-qu...
Weaponless asked 5/4, 2018 at 0:23
1
this.editForm = this.fb.group({
step1: this.fb.group({
transport_type_id: ['', [Validators.required]],
flight_code: ['', []],
}),
stops: this.fb.array([
this.initStop() //adds dynamicaly the ...
Ceremony asked 14/6, 2017 at 12:35
3
Solved
I have an app which shows a list of users with a profile picture.
When I update a value for this user the image gets reloaded as the observable list emits all data again.
How can I avoid this?
<...
Transhumance asked 30/1, 2018 at 21:25
2
Solved
I'm currently working on an Angular 2 project with AngularFire2 and I'm trying to convert a FirebaseListObservable to a Promise. I know that it doesn't make much sense since Observables are more us...
Bradfield asked 27/1, 2017 at 0:8
6
Solved
I found a few implementation of AuthGuards that use take(1). In my project, I used first().
Do both work the same way?
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/first';
import { O...
Zurek asked 20/2, 2017 at 13:34
6
In my page there is a button that generates a report. That report needs data that is loaded using a http call to a rest endpoint when the page is loaded, but I do not have a guarantee that they are...
Disinterest asked 11/7, 2017 at 10:41
3
Solved
So the requirement is like:
I got a array of objects (e.g. Array)
[
{ empDept: 'Engineering', empLoc: 'Pune', empName: 'John' },
{ empDept: 'Engineering', empLoc: 'Mumbai', empName: 'Harry' },
...
Crysta asked 6/5, 2020 at 20:40
3
Solved
I have done this multiple times in my App. It's simple, it should work... But this time it doesn't.
My issue:
I am calling a method in a service from a Component A, my Component B is subscribed but...
Ezra asked 12/4, 2017 at 15:55
1
Using observable data services using the async pipe to update data directly in the view which is proving difficult to test (works fine normally).
I want to be able to update the view, fire click e...
Malign asked 26/8, 2016 at 23:42
1
Solved
A the document describes the tap() with following code:
import { fromEvent } from 'rxjs';
import { tap, map } from 'rxjs/operators';
const clicks = fromEvent(document, 'click');
const positions = ...
Quesada asked 18/2, 2020 at 7:10
5
Solved
I have a need/desire to use more than six parameters in a forkJoin. Currently, based on the answer to another related question it doesn't appear possible to send more than 6 parameters to forkJoin....
Brazen asked 28/3, 2018 at 19:34
3
I need to refresh the data in a component page in an interval. Also I need to refresh the data after doing some action. I am using Obeservables in the service so that I can subscribe to when the re...
Mainstay asked 6/7, 2017 at 11:24
3
Solved
I'm trying to set up my router config using a Resolve that returns an Observable from a BehaviorSubject. I've tried this in both angular 4.0.0-beta8 and angular 2.4.8+router 3.4.8
Here's my servic...
Wurtz asked 21/2, 2017 at 3:40
3
Solved
So I'd normally write my http requests like this
Service
getData() {
return this.http.get('url')
}
Component
getTheData() {
this.service.getData().subscribe(
(res) => {
//Do something
}, ...
Genovevagenre asked 19/2, 2019 at 16:47
2
Solved
I am trying to populate an array in my component called processes which is an array of process. Each process also has a list of tasks.
So currently, I am working with two api calls which are:
/pr...
Wack asked 20/2, 2017 at 0:4
1
Solved
I'm having a situation with Angular where a routing data resolver seems like it's poised to return data correctly, but then resolution never happens. It's especially odd because I have a parallel a...
Mews asked 23/5, 2019 at 19:9
1 Next >
© 2022 - 2024 — McMap. All rights reserved.