Reputation: 6952
Currently I have this code
var App = Ember.Application.create();
App.user = Ember.Object.create({
people: customers
});
App.editRowView = Ember.View.create({
template:"editRowModal"
});
App.userView = Ember.View.extend({
edit:function(e){
console.log(this.content.id);
App.editRowView.append();
}
});
My view goes as follows
<script type="text/x-handlebars" data-template-name="editRowModal">
<div class="modalBox" id="modalBox">
<span class="sprite closeToolTip"></span>
<h4>Restart</h4>
<div class="cont">
</div>
<div class="actions">
<a class="cancelSendNotification">cancel</a>
<a class="primary" id="restartCustomer">ok</a>
</div>
</div>
</script>
I have a button on the page that has the edit propertied binded to it on its click. Every time I click the button I can console.log the id of my model but I can't seem to make my view show in the dom. I'm not sure what is happening since my App.editRowView.template is pointint to the data-template-name attribute of my view template and in theory it should just bind... any clues?
Upvotes: 2
Views: 1419
Reputation: 628
try changing
App.editRowView = Ember.View.create({
template:"editRowModal"
});
to
App.editRowView = Ember.View.create({
templateName:"editRowModal"
});
Upvotes: 4