Questions tagged [subscribe]
994 questions
13
votes
1 answer
Angular ObjectUnsubscribedError while resubscribe
I'm getting the following error while trying to subscribe in the second time to an EventEmitter after that ngOnDestroy was invoked and called unsubscribe:
ngOnInit() {
this.route.params.subscribe(params => {
…

Or Yaacov
- 3,597
- 5
- 25
- 49
13
votes
4 answers
Resubscribe a user to a MailChimp list after unsubscribe
My site allows users to subscribe to MailChimp lists using the API via Drupal MailChimp module. But if a user unsubscribes by following the link in the email, and subsequently decides to re-subscribe by visiting my website and checking the…

Hugh Wormington
- 305
- 1
- 2
- 10
12
votes
3 answers
How to execute something after subscribe in angular
I want to return a boolean value ,but the variable in the "if" condition is undefined.
function() {
this.menuDataService.getMenu()
.subscribe(res => {
this.mainMenus = res.MainMenus;
console.log(this.mainMenus);
});
…

kzrfaisal
- 1,355
- 5
- 15
- 26
12
votes
1 answer
How to subscribe to multiple topics in FCM?
I'm newly learning android studio, so however I have one doubt in developing a android app that:
How can we subscribe to multiple topics in FCM?
Here is my code
public void subscribeToPushService() {
…

GOPALA KRISHNA REDDY KOVVURI
- 123
- 2
- 7
12
votes
2 answers
RXJS 5 .subscribe() without arguments
So a quick question. I've been using RxJS 5 for a few months now, and I've run into a bit of behavior that I don't really understand, as I haven't been able to look it up anywhere.
I'm in a situation where subscribing to an observable chain with…

DarkNeuron
- 7,981
- 2
- 43
- 48
12
votes
5 answers
Prevent OnErrorNotImplementedException
I want to achieve that if i call the Obervable.subscribe(Action1) method, it does not throw OnErrorNotImplementedException anywhere, but if i call Obervable.subscribe(Action1, Action1), the second action is called when an error is raised as normal.…

WonderCsabo
- 11,947
- 13
- 63
- 105
11
votes
2 answers
Pipe vs Subscribe in Angular
I hope everyone just doing fine. Can, please someone clearly explains which one to choose among pipe and subscribe, and why? when it comes to not only getting the response but also to initialize some other variables or make changes to the boolean…

unknown user
- 123
- 1
- 1
- 5
11
votes
2 answers
stomp message acknowledgement from client
I am using spring/stomp/websocket framework to notify users of messages asynchronously. I have done this successfully. However, I would be get ACK from the client so that some server side action can take place when this is done.
The flow is roughly…

myspri
- 283
- 7
- 14
10
votes
3 answers
Angular2 Get Request is made twice
I have a problem where Angular2 makes the same request twice. I don't know why, though, because I have only one time a subscribe on the Observable. Here is my code:
My service looks like this:
getProjects(): Observable {
return…

Boris Lapouchner
- 103
- 1
- 4
10
votes
1 answer
Pubsubhubbub on Rails. How to extract the raw POST body contents from the POST request?
I am having trouble setting up a pubsub enabled subscriber app using rails. I have currently subscribed to the open hub pubsubhubbub.appspot.com and am receiving pings to my application's endpoint. (as of now i have created a counter which…

Shripad Krishna
- 10,463
- 4
- 52
- 65
9
votes
3 answers
How to return boolean observable and check that boolean value
I want to use observable to be able to run my code synchronously, I want to return a true value after i get the icons from the server so that i can use it. How do i do it ?
ngOnInit() {
this.addIcons().subscribe(data=>{
if(data===true)
…

Ashim
- 877
- 2
- 12
- 22
9
votes
1 answer
Angular2 - catch/subscribe to (click) event in dynamically added HTML
I'm attempting to inject a string that contains a (click) event into the Angular2 template. The string is dynamically retrieved from the back-end much after the DOM is loaded. No surprise here that Angular won't recognize the injected (click)…

Rhyeen
- 127
- 1
- 1
- 5
8
votes
3 answers
How to wait for function with subscribe to finish in angular 8?
I want to wait for one function to finish before executing the function next to it.
I have one function called getData() in which http call occurs which returns an observable. The second function checkDuplicate() we have subscribed to that function…

sherin shaf
- 143
- 1
- 1
- 9
8
votes
4 answers
Angular 6 observables - extract data from .subscribe() function and use it elsewhere
I'm banging my head against the wall with observables. Almost all of the documentation I can find is in the older rxjs syntax.
I have an API call which is an observable. I'm calling it elsewhere and subscribing to it - trying to populate a table…

Kyle Vassella
- 2,296
- 10
- 32
- 62
8
votes
1 answer
Angular 2 pipe, using observable correctly, my pipe does not return a poster path
I'm trying to call my service to get a poster Url for all my movies (Want to show the poster of them). I'm using Angular2 and have for now created a pipe that should do the job.
I have this code:
…

Mikkel
- 1,771
- 11
- 35
- 59