I am trying Angular2.
I noticed that the http service use Observable object instead of Promise (I don\'t like much that choice.. async
Observable
Promise
async
This is my working solution:
if (this._heroes != null && this._heroes !== undefined) { return Observable.create(observer => { observer.next(this._heroes); observer.complete(); }); }
I hope that this is the best solution.