I'm new to web development stuff and have been looking at some ember, I wanted to try running this with Spring boot. I got spring boot working and was able to run the sample blog example created with ember.
Now I want to some data read from the spring server, for example I can go to http://localhost:8080/greeting?name=User and get the following displayed onto the page {"id":12,"content":"Hello, User!"}
What I want to do is get ember to read make that call instead of me manually adding it in the url and getting ember to then display that data.
So in ember my app.js looks like this
App.IndexRoute = Ember.Route.extend({
model: function() {
return $.getJSON("http://localhost:8080/greeting?name=User");
}
});
This I believe makes the call. I was trying to re-display the data onto the onto the index.html like this:
<script type="text/x-handlebars" data-template-name="index">
<Not sure what to put here>
</script>
I may be missing something obvious or not getting something. I apologize if thats the case. Any help will be welcome
Aucun commentaire:
Enregistrer un commentaire