I am working with a simple list
<ul>
<li ng-repeat="spiel in spielListe">Do something</li>
</ul>
Along with a perfectly connected controller
$scope.spielListe = [];
There is also a method that adds objects to the array in this format:
var spielObjekt = {team1: "Teamname 1", team2: "Teamname 2", court: ""};
$scope.spielListe.push(spielObjekt);
As a result, the array appears like this:
https://i.sstatic.net/tUTFu.png
The specific content of the objects is not essential. The goal is for Angular to run the ng-repeat twice and display my text twice - however, the HTML page remains blank.
What mistake might I be making? Where could an error occur?
Update
It seems there is an issue with the .push function. I added one object with the same structure to my array, which displays correctly in the ng-repeat. However, the two objects pushed in later are not being shown. Is this a problem?
Update 2
Thank you for your assistance - it turns out the mistake was having multiple elements in the DOM with ng-controller="contentCtrl" declared within them. This caused the controller to be called multiple times and resulted in the objects not displaying as expected.