我最近开始修改Angular并观看视频,但在尝试按照某个教程时,我遇到了这个错误"Module not found: Error: Can't resolve 'rxjs/Rx' in 'C:\MAMP\htdocs\AngularFrontEnd\src\app'"
。错误发生在此文件中:
quote.service.ts:
import { Injectable } from "@angular/core";
import { Http, Response } from "@angular/http";
import 'rxjs/Rx';
import { Observable } from "rxjs";
@Injectable()
export class QuoteService {
constructor(private http: Http){
}
getQuotes() {
return this.http.get('http://onyx.space/api/quotes')
.map(
(response: Response) => {
return response.json().quotes;
}
);
}
}
可悲的是,由于我是新手,我不确定要采取哪些故障排除步骤。