Angular: Trying to use Observable.from, exported from rxjs/observable, with no luck

Created on 9 Dec 2015  路  3Comments  路  Source: angular/angular

seems to be related to #5283?

this code used to work

import from 'angular2/angular2';
Observable.from([
new Response(new ResponseOptions({
body: {
message: "color:red"
}
}))
]);

now after an upgrade to alpha-0.0.50, it stopped working (from 0.0.46).

Observable from angular2 seems to be trimmed down as in #5283.
But would expect the code below still to work as it is not part of angular2:

import from 'rxjs/observable';
Observable.from([
new Response(new ResponseOptions({
body: {
message: "color:red"
}
}))
]);

Most helpful comment

import 'rxjs/add/observable/from';

Alpha 50 uses RxJS alpha 14. So you should map it to rxjs/add/(observable|operator)/***. Make sure to add the config necessary in your system.config.

All 3 comments

import 'rxjs/add/observable/from';

Alpha 50 uses RxJS alpha 14. So you should map it to rxjs/add/(observable|operator)/***. Make sure to add the config necessary in your system.config.

thank you, makes sense now

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings