Answers for "angular return observable with error"

0

angular return observable with error

import { throwError } from 'rxjs';

// ...
method(): Observable<SomeClass> {
  // ...
  // from the 
  if (failedCondition) {
    return throwError('');
  }
  // ...
}
Posted by: Guest on September-15-2021

Code answers related to "angular return observable with error"

Code answers related to "Javascript"

Browse Popular Code Answers by Language