Last active
August 29, 2015 13:58
-
-
Save tylerwillingham/9966193 to your computer and use it in GitHub Desktop.
Trying to see if I'm doing something wrong since bind-attr doesn't appear to be working as expected..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#each}} | |
<li {{bind-attr class="isCompleted:completed"}}> | |
<input type="checkbox" class="toggle"> | |
<label>{{title}}</label><button class="destroy"></button> | |
</li> | |
{{/each}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Todos.Todo = DS.Model.extend({ | |
title: DS.attr('string'), | |
isComplete: DS.attr('boolean') | |
}); | |
Todos.Todo.FIXTURES = [ | |
{ | |
id: 1, | |
title: 'Learn Ember.js', | |
isCompleted: true | |
}, | |
{ | |
id: 2, | |
title: '...', | |
isCompleted: false | |
}, | |
{ | |
id: 3, | |
title: 'Profit!', | |
isCompleted: false | |
} | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="todo-list"> | |
<script id="metamorph-3-start" type="text/x-placeholder"></script><script id="metamorph-0-start" type="text/x-placeholder"></script> | |
<li class="" data-bindattr-1="1"> | |
<input type="checkbox" class="toggle"> | |
<label><script id="metamorph-4-start" type="text/x-placeholder"></script>Learn Ember.js<script id="metamorph-4-end" type="text/x-placeholder"></script></label><button class="destroy"></button> | |
</li> | |
<script id="metamorph-0-end" type="text/x-placeholder"></script><script id="metamorph-1-start" type="text/x-placeholder"></script> | |
<li class="" data-bindattr-2="2"> | |
<input type="checkbox" class="toggle"> | |
<label><script id="metamorph-5-start" type="text/x-placeholder"></script>...<script id="metamorph-5-end" type="text/x-placeholder"></script></label><button class="destroy"></button> | |
</li> | |
<script id="metamorph-1-end" type="text/x-placeholder"></script><script id="metamorph-2-start" type="text/x-placeholder"></script> | |
<li class="" data-bindattr-3="3"> | |
<input type="checkbox" class="toggle"> | |
<label><script id="metamorph-6-start" type="text/x-placeholder"></script>Profit!<script id="metamorph-6-end" type="text/x-placeholder"></script></label><button class="destroy"></button> | |
</li> | |
<script id="metamorph-2-end" type="text/x-placeholder"></script><script id="metamorph-3-end" type="text/x-placeholder"></script> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment