Hi all,

I'm just starting out with Angular and I'm running into an issue that I 
think should have an easy solution, but I'm having a hard time getting my 
head around how it should work.

In a nutshell, I have a list of categories (id, name) and a list of tasks 
(id, name, category_id). Clicking on a category link should filter the task 
list by that category. This is working fine. In addition, I'd like to be 
able to drag a task on top of a category label to re-categorize that task 
and have the UI updated accordingly (e.g. click on Category2 to see a list 
of Category 2's tasks, drag one of those tasks to the Category 3 label, 
that task should disappear from the current Category 2 filtered view and 
should appear when clicking on Category 3).

To set this all up, I've got a controller which handles the filtering and 
has a changeCategory() method that should find the task we're dealing with 
and change its category. I also have two directives: one to make an element 
(task) draggable and another to make an element (category) droppable.

In my "real" app, when I drop a task on top of a category, I make an ajax 
call to update the database and this works perfectly. The problem is that 
the UI doesn't reflect that the task's category has changed (as highlighted 
above). I've put together a simplified example of how I've got things set 
up: JSBin <http://jsbin.com/cejohana/3/edit?html,js,output>. 

If anyone could help point me in the right direction, I would be forever 
grateful :) Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to