Angular Modernizer
    Preparing search index...

    Transforms @Injectable service methods from Promise<T> to Observable<T>:

    1. Removes the async keyword from matching methods.
    2. Changes the return type Promise<T> to Observable<T>.
    3. Removes .toPromise() calls.
    4. Adds .pipe(retry(n), catchError(...)) to this.http calls (2 retries for post, put, patch and delete, 3 otherwise).
    5. Generates a private handleError() method if none exists.
    6. Adds the imports Observable, throwError, retry, catchError and HttpErrorResponse.

    Methods that already return an Observable are skipped. On failure the original source text is restored; on success the original text is returned in metadata.originalText.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    ruleId: "angular:promise-service-to-observable" = 'angular:promise-service-to-observable'

    Rule ID reported in every TransformResult.

    Methods