Error on Angular5 Importing RxJS in the project


Observable not found, what do I? I do not know how to use rxjs on http. anyone can tell me Please?

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { IEmployee } from './employee';
import { Observable } from 'rxjs/Observable ';

export class EmployeeService {

  private _url: string = "/assests/data/employee.json";
  constructor(private http: HttpClient) { }

  getEmployees(): Observable<IEmployee[]>{ 
    return this.http.get<IEmployee[]>(this._url);


In case of rxjs 6, you need to import Observable like this:

import { Observable } from 'rxjs';

You can check it here:

Answered By – alexanto

Answer Checked By – Dawn Plyler (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.