I am trying to pass data to the route through an json file.
app/templates/dashbord.js
app/routes/dashboard.js
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return $.getJSON( "app1.json");
},
});
public/app1.json
[
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7],
];
when i am trying to do like this no output is displaying on browser why? thanks in advance.
Aucun commentaire:
Enregistrer un commentaire