Skip to content

Instantly share code, notes, and snippets.

@workmanw
Created June 30, 2012 01:48
Embed
What would you like to do?
View context preservation
App.UserWidget = Ember.View.extend({
templateName: 'widget.user.handlebars',
user:null
});
{{#each App.users}}
{{view App.UserWidget userBinding="this"}}
{{/each}}
{{#with view.user}}
<h1>{{lastname}}, {{firstname}}</h1>
<!-- target="this" is invalid, part of my confusion is how to use this with context. -->
<span {{action "deleteUser" target="this"}}>Delete User</span>
{{/with}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment