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 trialMaja B.
12,984 PointsAngularJS - A Simple Todo List
Hi, I'm building a very simple Todo List with Angular and Bootstrap. You can have a look at it at Codepen
The problem is that when I do the following with Task 2:
- Click the Edit button of Task 2, make some textual changes and Save them.
- Check the checkbox of Task 2 (like saying task completed; Task 2 gets a line through)
- Click Remove button of Task 2
Well in this case the last task is deleted instead of Task 2.
Anyone knows why? What should I fix ...
3 Answers
Jon Brady
10,868 Pointsworks fine this end
Jon Brady
10,868 Pointsi take that back ... humm
Anthony Kornmeier
8,278 PointsIt appears that you are not saving the changes from your 'edit' and 'completed' forms to your tasks array in the scope. That is throwing off the state of the other tasks.
Maja B.
12,984 PointsMaja B.
12,984 PointsAre you sure? If you edit task (it should be task 1 or task 2, not the last one), save it, mark it as complete (by checking its checkbox) and remove it ... this works fine?
Well on my side it deletes the last task not the one that I'm working on.
Could you please check it again?