When you reference the CooSelection
service, you are expecting an array, but the factory returns an object. You could do this instead:
myApp.factory('CooSelection', function () {
return []; // Return an array instead of an object.
})
Also, in your DebugCooList
controller, your scope property does not match the name of the variable you are checking in the view. The controller code assigns to coo_selection
but the view checks coo_list_selection
, so you'll need to change one to match the other.