How to use forEach loop correctly in angular 2? You cannot use angular.forEach with angular , its with angularjs. use