This is because each ng-repeat has its own scope, and each ng-init will simply increment its own variable with scope. You can try to access the parent area with $parent .
If you are looking for continuous numbering, try this.
<div ng-controller="MyCtrl"> <div ng-repeat="a in ['a','b','c']" ng-init="current = $parent.start; $parent.start=$parent.start+3;"> <div ng-repeat="x in ['alpha','beta','gamma']"> {{current + $index}} </div> </div>
Where +3 should be +[LENGTH OF INNER ARRAY] .
http://jsfiddle.net/rvgvs2jt/2/
For your specific code, it will look like
<div ng-if="feedData.carouselMode == true" ng-init='current=$parent.start; $parent.start=$parent.start+a.carouselFeeds.length' ng-repeat="a in carousel_data"> <div class="owl-demo" class="owl-carousel" owl-carousel> <div class="item" ng-repeat="(key, item) in a.carouselFeeds"> {{current + $index}} <div ng-click="go('{{key}}', item.feedUrls.length, 'rtl')" ng-swipe-left="go('{{key}}', item.feedUrls.length, 'rtl')"> <img class="lazyOwl" ng-src="{{item.img}}" /> <span class="innersquare" image-ja="{{item.img}}"> <p ng-style="folderStyle">{{item.name }} </p> </span> </div> </div> </div> </div>
Rouby
source share