import {Injectable} from '@angular/core'; import { Observable } from 'rxjs/internal/Observable'; import {HttpClient} from '@angular/common/http' @Injectable() export class FacialExpression { constructor(private http: HttpClient){} detectedEmotion():Observable<Object>{ return this.http.get('/assets/data/face.json'); } }