Updated: angular.forEach instead Array.forEach