Added the for loop to the angular controller. Should work now.