Angular Loop Over Array Javascript Length Function