Reputation: 595
Try to build an ember.js based web app but it doesn't work, http://wilhelminaschool.eu/app2/
with the app js i make a route and defining an url to a json file but the template doen'st show anything, what i'am doing wrong?
Upvotes: 1
Views: 63
Reputation: 47367
I'm going to piggyback on splattne's answer,
this is incorrect in your posts
handlebar template
{{#each posts}}
<li>{{title}}</li>
{{/posts}}
and should be
{{#each posts}}
<li>{{title}}</li>
{{/each}}
you are opening and closing an each loop, and the handlebar tags need to be the same.
Upvotes: 2
Reputation: 1780
You have cross origin issue getting the json from the server. You need to add a header allow cross origin access to the server.
app/adapters/application.js
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://www.wilhelminaschool.eu/',
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "X-Requested-With"
}
});
Upvotes: 1
Reputation: 104040
I think you misspelled some URLs in your route's model functions:
http://www.wilhelminaschool.eu/?json=get_page&page_id=10063');
Did you forget the /api segment?
and
http;//www.wilhelminaschool.eu/api/get_recent_posts');
the http://
Upvotes: 1