I just upgraded from Angular 2 beta16 to beta17, which in turn requires rxjs 5.0.0-beta.6. (Changelog here: https://github.com/angular/angular/blob/master/CHANGELOG.md#200-beta17-2016-04-28) In beta16 all was working well regarding Observable/map functionality. The following...
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 { Observable...
Is the only difference between Observable.of and Observable.from the arguments format? Like the Function.prototype.call and Function.prototype.apply? Observable.of(1,2,3).subscribe(() => {}) Observable.from(...
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...
I am having issue with importing Observable.of function in my project. My Intellij sees everything. In my code I have: import {Observable} from 'rxjs/Observable'; and in my code I...
I need to create a subscription to an Observable that is immediately disposed of when it is first called. Is there something like: observable.subscribeOnce(func); My use case, I am...
When I run the linter it says: subscribe is deprecated: Use an observer instead of an error callback Code from this angular app: this.userService.updateUser(data).pipe( tap(() => {bla bla bla})...
The function more() is supposed to return an Observable from a get request export class Collection { public more = (): Observable<Response> => { if (this.hasMore()) { return this.fetch();...
I have an Angular 2 service: import {Storage} from './storage'; import {Injectable} from 'angular2/core'; import {Subject} from 'rxjs/Subject'; @Injectable() export class SessionStorage extends Storage { private _isLoggedInSource = new...
Do you need to unsubscribe from Angular 2 http calls to prevent memory leak? fetchFilm(index) { var sub = this._http.get(`http://example.com`) .map(result => result.json()) .map(json => { dispatch(this.receiveFilm(json)); }) .subscribe(e=>sub.unsubscribe());...