I have been trying to create a function that is similar to http.get(...) but not doing any http. Basically what I have done is that I defined a function
async myFunc(): Observable<string> {
var myObservable: Observable<string>;
//.....
// the rest of the function's code comes here
// ...
return myObservable;
}
But I always get an error that it is not compatible with ES5/ES3 and should return a Promise object? But I am wondering how it became possible with Angular 5's http.get function? Where clearly it returns an Observable.
Thanks,
Artanis