My Json API from Server
am getting this api response from server how to i display the json in template.
{
past_bills: [
{
Status: "Success",
Count: 3,
Subscribers: [
{
SubscriberID: 100168,
Count: 3,
Invoices: [
{
InvoiceYear: "2014",
InvoiceMonth: "1",
Link: "http://ift.tt/1KFTRPn"
},
{
InvoiceYear: "2014",
InvoiceMonth: "2",
Link: "http://ift.tt/1Kbp0fu"
},
{
InvoiceYear: "2014",
InvoiceMonth: "3",
Link: "http://ift.tt/1KFTT9R"
}
]
}
],
id: 1
}
]
}
My Routes
export default Ember.Route.extend({
model: function(params) {
this.store.find('past-bill',params);
}
});
My Template
<table>
{{#each item in model}}
<tr><td>Hiii</td></tr>
{{/each}}
</table>
My Model File
import DS from 'ember-data';
export default DS.Model.extend({
Status: DS.attr(),
Count: DS.attr(),
Subscribers: DS.attr()
});
I want to display the response json to template. i tried but not getting in template.
Aucun commentaire:
Enregistrer un commentaire