Reputation: 5782
I recently started tinkering with Angular and watching videos, but upon attempting to follow a certain tutorial, I got hit with this error "Module not found: Error: Can't resolve 'rxjs/Rx' in 'C:\MAMP\htdocs\AngularFrontEnd\src\app'"
. The error is in this file:
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;
}
);
}
}
Sadly, since I'm new to this, I'm not sure what troubleshooting steps to take.
Upvotes: 1
Views: 476
Reputation: 24424
Just remove import 'rxjs/Rx';
and try to read more about rxjs from angular documentation
Upvotes: 1