I have a JSON source that provides me with a double array:
// Function and module code omitted ..
$scope.texts = [
['Small sheep and ham.'],
['Ducks go moo.', 'Helicopters and racecars go bang!']
];
My goal is to display each string in the array within a <p>
tag.
Initially, I attempted the following (example):
<div ng-repeat="text in texts">
<p ng-repeat="p in text">{{p}}</p>
</div>
However, this prints out all the lists,
HOWEVER: I would like the ability to select which array to display through an external controller or directive.
Is there a way to programmatically choose the array to be displayed?