Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ajax.d.ts 662B

12345678910111213141516171819
  1. import { AjaxCreationMethod } from './AjaxObservable';
  2. /**
  3. * There is an ajax operator on the Rx object.
  4. *
  5. * It creates an observable for an Ajax request with either a request object with
  6. * url, headers, etc or a string for a URL.
  7. *
  8. * ## Using ajax.getJSON() to fetch data from API.
  9. * ```javascript
  10. * import { ajax } from 'rxjs/ajax';
  11. * import { map, catchError } from 'rxjs/operators';
  12. *
  13. * const obs$ = ajax.getJSON(`https://api.github.com/users?per_page=5`).pipe(
  14. * map(userResponse => console.log('users: ', userResponse)),
  15. * catchError(error => console.log('error: ', error))
  16. * ));
  17. * ```
  18. */
  19. export declare const ajax: AjaxCreationMethod;