I'm having trouble declaring an observable and adding data to it in Angular 2. I've spent the last 5 hours trying to figure it out.
Here's what I've attempted:
this.products : Observable<array>;
var object = {"item": item};
this.products.subscribe(object)
Every approach I've tried results in an error.
I need to use an observable because I have an array of objects that changes frequently, but the ngFor in the template isn't updating the values. Can anyone offer some help?
http://pastebin.com/1cFXJHHk Here is my attempt at solving this issue