Change all array.forEach to angular.forEach for IE compatibility