Angularjs Loop Through Array Javascript Append File