<ion-view view-title="الكتب">
    <ion-content>
        <div ng-repeat="book in allBooks">
            <div ng-if="$index%2==0" class="row">
                <div class="col my_items_style2" align="center">
                    <div align="center" >
                        <ion-item style="border: none;"  ng-click="navigateToView(allBooks[$index].book_id)">
                            <img  id={{allBooks[$index].book_id}} align="center" height="100%"
                                  width="100%"  src="icon/book_icon002.png" />
                        </ion-item>
                        <br>
                        <label>{{allBooks[$index].book_name}}</label>
                    </div>
                </div>
                <div ng-if="allBooks[$index+1] != null" class="col my_items_style2" align="center">
                    <div align="center" >
                        <ion-item style="border: none;" ng-click="navigateToView(allBooks[$index+1].book_id)">
                            <img id={{allBooks[$index+1].book_id}} align="center" height="100%"
                                 width="100%" src="icon/book_icon002.png" />
                        </ion-item>
                        <br>
                        <label>{{allBooks[$index+1].book_name}}</label>
                    </div>
                </div>
            </div>
        </div>
    </ion-content>
</ion-view>