2017-12-28 13 views
0

rxjs를 사용하여 일부 데이터를 검색하려고합니다. 200을 반환하지만 응답은 null입니다. 응답을 검색하기위한 추가 단계가 있습니까?RxJS ajax가 null 응답을 반환합니다.

테스트 api; https://reqres.in

감사합니다.

import {ajax} from 'rxjs/observable/dom/ajax'; 

import 'rxjs/add/operator/map'; 


ajax.get({ 
      url: "https://reqres.in/api/users?page=2", 
      // crossDomain: true, 
      method: "GET", 
     }) 
      .subscribe(data => { 
       console.log(data) 
       debugger 
      }) 

enter image description here

+0

걸릴 data.json (ajax()해야한다) 대신에 데이터 만 –

답변

0

결코 마음 ,

그것은하지 ajax.get()