I'm struggling to access an array within an array of objects in my AngularJS project.
Here's the HTML:
<li ng-repeat="ai in main.a2">
<div np-repeat="bi in ai.b">
<span ng-bind="bi"></span>b2
</div>
</li>
And here is the javascript:
var app = angular.module('app', []);
app.controller('MainCtrl', ['$scope', function($scope) {
self.a2 = [
{b: ['foo']},
{b: ['bar', 'baz']},
{b: ['boo']}
];
}]);
The expected output should be:
foob2
foobazb2
boob2
However, the actual output is:
b2
b2
b2
You can view the (non-working) example here.
I've looked at similar posts, but most have simple mistakes. I believe I may have fallen into a pitfall that I haven't caught yet.