I am using a third party library typeaheadjs for an ajax drop down.
I want to render an ember view in each dropdown element, typeahead supports a suggestion hook for this.
suggestion: function(model){
var view = Ember.View.create({
model : model,
template: Ember.Handlebars.compile('Hello {{model.id}}')
}).createElement();
return view.element;
},
model is an ember-data model. The return element needs to be the html to insert into each <li> tag. The following works but the binding {{model.id}} is never rendered, I just get Hello.
Any ideas why?
Aucun commentaire:
Enregistrer un commentaire