refactor(Observable): implement toPromise and fromPromise without side effects

BREAKING CHANGE:

toPromise is no longer an instance method of the `Observable` returned
by Angular, and fromPromise is no longer available as a static method.

The easiest way to account for this change in applications is to import
the auto-patching modules from rxjs, which will automatically add these
operators back to the Observable prototype.

```
import 'rxjs/add/operator/toPromise';
import 'rxjs/add/observable/fromPromise';
```

Closes #5542
Closes #5626
This commit is contained in:
Jeff Cross
2015-12-04 09:09:57 -08:00
parent 1f35048d54
commit c39f4c3b38
7 changed files with 13 additions and 18 deletions

View File

@ -690,11 +690,8 @@ var NG_ALL = [
'Observable:js',
'Observable#create():js',
'Observable.forEach():js',
'Observable#fromPromise():js',
'Observable.lift():js',
'Observable.subscribe():js',
'Observable.take():js',
'Observable.toPromise():js',
'OutputMetadata',
'OutputMetadata.bindingPropertyName',