<ion-view view-title="瞄瞄" >
    <ion-nav-buttons side="left">
        <button class="button button-clear icon ion-ios-list-outline" ng-click="openPopover($event)"></button>
    </ion-nav-buttons>
    <ion-nav-buttons side="right">
        <a class="button button-clear icon ion-ios-search" ui-sref="app.home_search">
        </a>
        <button class="button button-clear icon ion-email-unread" style="padding-left:10px"></button>
    </ion-nav-buttons>
    <ion-content>
        
        <!--下拉刷新-->
        <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
        </ion-refresher>
        <div class="tabs-striped tabs-top">
            <div class="tabs" style="top:0">
                <a  ng-class="type=='hot'?'tab-item active':'tab-item'" ng-click="changetype('hot')">
                   热门
                </a>
                <a ng-class="type=='trend'?'tab-item active':'tab-item'" ng-click="changetype('trend')">
                    潮流
                </a>
                <a ng-class="type=='news'?'tab-item active':'tab-item'" ng-click="changetype('news')">
                    最新
                </a>
            </div>
        </div>
        <div class="icontent">
            <ion-slides   options="data.sliderOptions" slider="data.sliderDelegate">
                <ion-slide-page ng-repeat="banner in index.banners">
                    <div class="box banner"><img ng-src="{{banner.value}}" /></div>  
                </ion-slide-page>
            </ion-slides>
             
            <div class="item item-image" style="margin: 20px 0; border: none;" ng-if="index.users.length>0">
                <!-- <i class="icon ion-ios-arrow-left" style="font-size: 1.5rem;"></i> -->
                <span class="subcontent">
                    <img ng-src="{{user.user.avatar}}" ng-repeat="user in index.users"/>
                </span>
                <!-- <i class="icon ion-ios-arrow-right" style="font-size: 1.5rem"></i> -->
            </div>
            <div class="list">
                <div class="item mainitem" ng-click="toDetail(item.id)" ng-repeat="item in index.dreams">
                    <div class="row">
                        <div class="col">
                            <img ng-src="{{item.user.avatar}}" />
                            <div  class="myblock">
                               <div>{{item.user.nickname}}<span class="calm">{{item.user.birthday | getage}}岁</span></div>
                                <div class="mysecond">{{item.user.city}}></div>
                            </div>
                        </div>
                        <div class="col" style="text-align:right">
                            <div style="margin-top:8px">
                                <img ng-src="img/heart.png" class="iheart" />
                                <span class="calm">{{item.care_num}}</span>
                                <span>人关注</span>
                            </div>
                            <div  class="mysecond">剩余{{item.time}}天</div>
                        </div>
                    </div>
                        <img ng-src="{{item.img.pic}}" />
                    </div>
            </div>
        </div>
        <!--上拉更多-->
        <ion-infinite-scroll ng-if="filter.hasMore" on-infinite="load(false)" distance="10%"></ion-infinite-scroll>
    </ion-content>
    <script id="my-popover.html" type="text/ng-template">
        <ion-popover-view class="pview">
            <ion-content>
             <div class="list">
                 <a  class="item item-icon-left">
                     <i class="icon ion-qr-scanner"></i>
                    扫一扫
                 </a>
                 <a class="item item-icon-left" ui-sref="app.home_add">
                     <i class="icon ion-plus"></i>
                     创造梦想
                 </a>
                 <a class="item item-icon-left" ui-sref="app.my">
                     <i class="icon ion-android-person"></i>
                   个人中心
                 </a>
                 <a class="item item-icon-left" ui-sref="app.home_dream">
                     <i class="icon ion-ios-folder-outline"></i>
                     我的收藏
                 </a>
                 
             </div>
            </ion-content>
        </ion-popover-view>
    </script>
</ion-view>
