Im very new to the "JS Framework topic" and now I try to
- Get data from a json-file
- Display it in a table
Later I want to filter/sort the data, but I want to do it step by step.
What I came up with so far:
app.js
App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
});
App.IndexRoute = Ember.Route.extend({
model: function(){
$.ajaxSetup({
async: false
});
$.getJSON("json/json_10k.json", function(json) {
return json;
});
}
});
index.html (part of it):
<script type="text/x-handlebars" id="index">
<ul>
{{#each item in model}}
<li>:{{item.Id}}</li>
{{/each}}
</ul>
</script>
Now, I dont see any data/errors. Maybe somebody have an idea, what could be wrong here.