remove unnecessary anonymous function in angular.forEach