As I said in the other thread mere minutes ago, if you’re getting this stuff from futures, you have to initialize things in the template to sane enough defaults. In the long run, I think you are trying to push too much work into the template. I would do this instead:
item = {};
http.get(url).subscribe((rsp) => {
let raw = rsp.json();
this.item = raw.Items.Item;
});
<p>{{item.ASIN}}</p>
still nt working…
there is some issue with subscribe …the control is not coming out of it i think…console.log for everything is working fine inside the subscribe…but not outside
the code of line just after subscribe is not working…
That is how asynchronous programming works. Inside the subscription is the only place you can rely on the data. If you assign it to an object property from there, Angular’s change detection is smart enough to do the right thing and reflect the changes in the template.