In a child controller, I'm populating an array on the parent scope:
$scope.person.testArray = [{id: "test"},{id: "test2"}];
That works fine and the person property now has an extra property called testArray, which contains the above values.
Then in the view associated with the child controller, I want to display the values of the array:
<div ng-repeat="op in person.testArray">
{{op.id}}
</div>
Nothing shows up.
However, I know it's related to the fact that I'm using ng-repeat. If, in the child controller I set a regular property on the person object, such as:
$scope.person.test = "test";
and then in the view I do:
{{person.test}}
it shows the string "test".
What am I doing wrong with ng-repeat ?