Linked Questions

1 vote
3 answers
9k views

I am passing data between 2 independent components using shared service. When I used a subject in my shared service, I could not see the subscribed data in html of the subscribed component but could ...
bhagya sri's user avatar
0 votes
1 answer
323 views

my effects when erring, calls a method in service to display a dialogue. When dialogue completes, it puts result into an observable. I have a component that is listening to that observable inside ...
user1019042's user avatar
  • 2,256
280 votes
8 answers
169k views

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 ...
user avatar
78 votes
10 answers
213k views

It is possible generate a service with angular cli and add it as a provider in the app.module.ts in a single step or using an special option in the ng g service command? When a execute: $ ng g ...
Pablo Ezequiel Inchausti's user avatar
55 votes
9 answers
88k views

Currently have a scenario where a method within a shared service is used by multiple components. This method makes an HTTP call to an endpoint that will always have the same response and returns an ...
patryk0605's user avatar
  • 1,111
57 votes
4 answers
173k views

Maybe I'm missing something. I can't find a simple tutorial for Observable and its syntax. I'm working with Angular, I need to call a function (defined in a component) from a service. I read this ...
Johannes's user avatar
  • 705
23 votes
4 answers
43k views

I am trying to create an observable that returns values when changes to a localStorage variable happens. My subscriber is not getting the new values upon changes to localStorage (or for that matter an ...
Prabhat's user avatar
  • 4,496
21 votes
5 answers
24k views

I'm building a vertically scrolling calendar. I'm getting the initial days to load, but when new days are added to the list, they aren't being rendered. <cdk-virtual-scroll-viewport class="demo-...
Will Luce's user avatar
  • 1,841
12 votes
2 answers
29k views

I am pretty new to Observables. How would I create Observable just from a simple string? Then subscribe to it and output it when it changes. Does that make sense? I don't have any luck with google ...
be-codified's user avatar
  • 6,174
6 votes
3 answers
16k views

I have two component A and B, where component A contains a button. I wish when user click on this button, fire a function on component B <A></A> <router-outlet></router-outlet>...
LHIOUI's user avatar
  • 3,337
13 votes
1 answer
29k views

Working with RxJS in Angular 4.x, I'm seeing two very different patterns for generating Observables from streams of user initiated actions. One stream is the direct result of a user clicking an 'add ...
Potatoes's user avatar
  • 143
10 votes
2 answers
6k views

Im using BehaviourSubject from RxJS: private rights = new BehaviorSubject<Array<string>>([]); updateRights(rights: Array<string>) { this.rights.next(rights); } getRights(): ...
Mohit Harshan's user avatar
3 votes
2 answers
9k views

My Service code looks like below - DataService @Injectable() export class DataService { ... private serviceRequestDtoSource = new BehaviorSubject<ServiceRequestDto>(null); serviceRequestDto$ =...
coder87's user avatar
  • 157
6 votes
2 answers
8k views

I am new to Observable style programming. I have a question: I want to share user info across the app between component - and I use BehaviorSubject to share this info. This is inspired by sharing ...
Hugh Hou's user avatar
  • 2,394
2 votes
2 answers
6k views

I am using the BehaviorSubject following the article here: https://coryrylan.com/blog/angular-observable-data-services In this article the author is using loadAll() to load all items and load() for ...
user8408326's user avatar

15 30 50 per page
1
2 3 4 5