I have this Ajax and Ember.js call
$.ajax({
url: '../data',
type: 'GET',
cache: false,
dataType: 'json',
data: ({
func: "getAllLists"
}),
success: function(data) {
console.log('DEBUG: GET Data OK');
var list = [
{
uid: data[0].uid
}
];
App.ListRoute = Ember.Route.extend({
model: function () {
return list;
}
});
},
error: function() {
console.log('DEBUG: GET Data Failed');
}
});
this is tam
{{#each}}
<li>
{{#link-to 'project' this}}
{{title}}
{{/link-to}}
</li>
{{/each}}
and i have an error: Assertion Failed: The value that #each loops over must be an Array. You passed (generated list controller). What im doing wrong?