<div ng-init="num_cover_photo:new Array(4)">
<div ng-repeat="photo in num_cover_photo">
<img ng-src="cover_"{{$index}} />
</div>
</div>
I know above code won't work, but that's my idea. I don't want to declare something like this
$scope.cover_photo = [{
bla
bla
}]
because what I want is simple, able to use ng-repeat to build few block of markup. I'd google but many suggested I create a dumb array of object in controller. Any clue I can ng-init it on the fly?