There are several ways to do this, but basically you need some kind of server-side API to handle actually querying the MySQL database and returning the data. This is usually done using the REST API using the JSON exchange format .
PHP, Node , Ember. , , , JSON , :
[
{"title": "blog post 1", "body": "this is a blog post"},
{"title": "blog post 2", "body": "this is another post"}
]
Ember - ajax:
var IndexRoute = Ember.Route.extend({
model: function()
{
return $.getJSON("http://apiurl.com/search");
}
});
Ember , , getJSON JQuery.
:
<script type="text/x-handlebars" data-template-name="index">
{{#each}}
{{title}}<br/>
{{description}}
{{/each}}
</script>
Ember EmberData ajax, , Ember , , EmberData. Discourse:
http://eviltrout.com/2013/03/23/ember-without-data.html
Ember Guides :
http://emberjs.com/guides/
http://emberjs.com/guides/routing/specifying-a-routes-model/