I am trying to add a new component dynamically using the following code:
var view = Ember.View.create({
template: Ember.Handlebars.compile('{{image-upload}}')
});
Ember.run(function() {
view.appendTo(document.body);
});
but I get the error:
Uncaught Error: Assertion Failed: You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.
Can someone point me in the right direction please?
Aucun commentaire:
Enregistrer un commentaire