Open p3140 opened 8 years ago
instead of using the whole library, it's best to use:
import 'rxjs/add/observable/throw';
Just in case this saves someone a couple minutes, make sure to do import 'rxjs/add/observable/throw';
and not import 'rxjs/add/operator/throw';
.
You should import Observable from rxjs/RX instead of rxjs/Observable, pulling it this way automatigically get you all of the operators ('map', throw...)
import {Observable} from 'rxjs/Rx';
@javagose please take a look at the below comment by owner of rxjs, you shouldn't import Observable from rxjs/Rx:
https://github.com/ReactiveX/rxjs/issues/1866#issuecomment-302244695
Hi. In file data.service.ts you need to add import 'rxjs/Rx'; for handleError to work. Greetings.