$scope.listValueChanged = function (name) {
listId = [];
$scope.listType= name;
};
if ($scope.contacts && $scope.contacts.length > 0) {
var gsSelectedContacts =$scope.contacts;
for (var i = 0; i < $scope.contacts.length; i++) {
contactIds.push(gsSelectedContacts[i].id);
}
}
for the above code I got review comments from my superior like below Logic in the controller that isn't assigned directly to the scope should be fulfilled elsewhere before it gets to the controller, then applied to the $scope
.
I am using this method at one place only. Do, i really need to move this logic to services?