You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
I bumped into the problem with lettable operators, in particular, with timer.
For instance, this: import 'rxjs/add/operator/catch'
-- still works and even changes Observable object globally so there's no need to import that 'catch' again in a certain ts file once it is imported in project module file.
And this: import 'rxjs/add/observable/timer'
-- doesn't work anymore, instead: import { timer } 'rxjs/observable/timer'
-- should be used and it doesn't modify Observable object, it is used as an independent function, and it cannot be imported globally, it should be imported in each ts file individually if it is needed.
Why is import 'rxjs/add/operator/catch'
still in use and has its counterpart of import {catchError} from 'rxjs/operators/catchError'
and import 'rxjs/add/observable/timer'
is no longer in use?
Is there any documentation on the topic? On the import syntax migration?
Thank you.
The text was updated successfully, but these errors were encountered:
maksfastovets
changed the title
throwError vs Observable.throw
catchError vs Observable.catch
Jan 9, 2018
I bumped into the problem with lettable operators, in particular, with timer.
For instance, this:
import 'rxjs/add/operator/catch'
-- still works and even changes Observable object globally so there's no need to import that '
catch
' again in a certain ts file once it is imported in project module file.And this:
import 'rxjs/add/observable/timer'
-- doesn't work anymore, instead:
import { timer } 'rxjs/observable/timer'
-- should be used and it doesn't modify Observable object, it is used as an independent function, and it cannot be imported globally, it should be imported in each ts file individually if it is needed.
Why is
import 'rxjs/add/operator/catch'
still in use and has its counterpart of
import {catchError} from 'rxjs/operators/catchError'
and
import 'rxjs/add/observable/timer'
is no longer in use?
Is there any documentation on the topic? On the import syntax migration?
Thank you.
The text was updated successfully, but these errors were encountered: