Just want to understand why my pubnub javascript code does not receive a message from a channel. I can subscribe and publish, but if another browser sends a new publish message, the other browser can not receive the message. heres my code:  $(documen...
I have got a subscribe function on one of my observable objects. I assume that the subscribe function should only execute when there is a change to it's observable object. Though when I trace my code, I can see that it's being executed after...
I'm using Karma with PhantomJS to run tests on components that are using RxJS.  The tests themselves seem to be doing fine but I keep getting this error at seemingly random times:  PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR  at webpack:///~/rxjs/Subs...
I have not been able to solve what is happening inside of this .subscribe method.   getHeroes(): void {     this.heroService.getHeroes()         .subscribe(heroes => this.heroes = heroes);   }   I always thought that this.heroes = heroes was being...
Im trying to fix this problem cause i can't login in my app. I was following a youtube tutorial cause im new with angular. This is the owner's github with his project -> https://github.com/wesdoyle/base-chat/blob/master/src/app/services/ch...
Whats the way to simplify something like the following code example? I can't find the right operator.. could anyone give a short example?  this.returnsObservable1(...)   .subscribe(      success => {        this.returnsObservable2(...)...
Hi In my Angular Component, i have this code in one of my methods  this.http.get("http://localhost:8080/poeples") .map(     resp => { resp = resp.json(); } ).subscribe(     (data) => { this.poeples = data; },     err =>  console.log(...
I've been returning requests from my functions like this:  makeConnection(data: any) {     console.log('makeConnection');     return this.api.get(data.url, data.dataToSend);   }   So I can subscribe like this: makeConnection.subscribe();...
Angular front-end calls a service that must return observable. I need to set the calling component's variable to a value from the service's observable, but I can't find a way to access the component variable.  Hoping I'm not missing s...
I follow this guide, and i try to do something similar at Unrelated Components: Sharing Data with a Service paragraph  Data Service:   @Injectable() export class MyDataService{    private messageSource = new BehaviorSubject(null);   currentMessage =...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.