Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRodney Solomon
3,160 PointsAngularJS project not working live
check out http://angular.rodneysolomonjr.net/ two things stand out: 1) when i go to edit the task, another box shows 2) the strikethrough is not showing.
Could use your help!
3 Answers
Russell Cousineau
1,541 PointsHere's the problem:
<div
class="item ng-scope"
ng-class="{'editing-item': editing, 'edited': todo.edited}, 'completed': todo.completed"
ng-repeat="todo in todos | orderBy: 'completed'" ng-init="todo.completed = false">
You need to move the closing brace after "todo.edited" to be after "todo.completed".
Rodney Solomon
3,160 Pointsyes you can see all the code here: https://gist.github.com/rsolomonjr/dc8361e376ce13730b04 laid out in each file.
Rodney Solomon
3,160 Pointshere's my todos.html
<div class="list">
<div class="add">
<a href="" ng-click="addTodo()">+ Add a New Task</a>
</div>
<div class="item" ng-class="{'editing-item': editing, 'edited': todo.edited}, 'completed': todo.completed" ng-repeat="todo in todos | orderBy: 'completed'" ng-init="todo.completed = false">
<input ng-model="todo.completed" type="checkbox" />
<!-- <span ng-click="todo.completed = !todo.completed; todo.edited = true"></span> -->
<label class="editing-label" ng-click="editing = true">{{todo.name}}</label>
<input ng-change="todo.edited = true" ng-blur="editing = false;" ng-show="editing" ng-model="todo.name" class="editing-label" type="text"/>
<div class="actions">
<a href="" ng-click="saveTodos(todo)">SAVE</a>
<a href="" ng-click="deleteTodo(todo, $index)" class="delete">DELETE</a>
</div>
</div>
</div>
Jake Lundberg
13,965 PointsJake Lundberg
13,965 PointsCould you post your code so we can see what might be going on?