IE8 Support

Use angular.forEach and an indexOf definition for IE