최근 rxjs 버전을 beta.2에서 beta.11로 업데이트했으며 다른 패키지와 마찬가지로 내 map
이 작동하지 않습니다 ... 여기에서 같은 작업을 시도했습니다 https://github.com/ReactiveX/rxjs/issues/1888 다른 사람들처럼, 같은 오류 :rxjs가 매핑 오류를 제공합니다.
Property 'map' does not exist on type 'Observable<Response>'.
내 service.ts
은 다음과 같습니다
import Rx from "rxjs"
import {Http} from "angular2/http";
import {Injectable} from "angular2/core";
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';
import 'rxjs/add/operator/map';
@Injectable()
export class ApiService {
constructor(private http: Http) { }
get(onNext: (json: any) => void) {
this.http.get("api/random").map(response => response.json()).subscribe(onNext);
}}
내 패키지는 JSON이 (의 일부)과 같습니다
012 3,516,"dependencies": {
"angular2": "2.0.0-beta.17",
"bootstrap": "3.3.7",
"es6-promise": "^3.2.1",
"es6-shim": "^0.35.1",
"jquery": "3.1.0",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.11",
"systemjs": "0.19.36",
"zone.js": "0.6.15",
"typescript": "1.8.10" },
또한 내가 생각 비주얼 스튜디오 다운로드하지 않습니다 수 있습니다 ... 내 rxjs
번들 폴더를 beta.11하는 beta.2에서이 Rx.js
도 Rx.umd.js
, 이제 Rx.umd.js
이 남아도 있었다 변경 업데이트 할 때 실현 전체 라이브러리 ... 그러나 시도한 Node.js
또한 동일한 다운로드 파일 ...하지만 이러한 변경 사항에 대한 rxjs
변경 사항에 아무것도 찾을 수 없습니다 ... 그리고 만약 내가 그게 잘 작동 다운 그레이드 ...
매우 감사하게 될 것입니다 도움.