I have been experimenting with Angular, working on small exercises to improve my skills. I have managed to display objects in the controller but am struggling to use service and factory to display an array called "names" on a table. Can someone please review my code and point out what I am doing wrong? Additionally, how can I use a factory to achieve the same result? Here is the code:
After receiving some answers, I realized that the factory is not displaying the ethnicity information as expected.