@fernandopaiva wrote:
I'm using tabs and I want to create a fixed search to list. How could I do this ?
tabs.html
<ion-tabs class="tabs-icon-top tabs-top tabs-color-active-positive"> <!-- Empresas Tab --> <ion-tab title="Empresas" icon-off="ion-ios-home-outline" icon-on="ion-ios-home" href="#/tab/emp"> <ion-nav-view name="tab-emp" class="has-footer"></ion-nav-view> </ion-tab> </ion-tabs>
empresa.html
<ion-view view-title="Empresas"> <!--search bar--> <div class="bar bar-subheader item-input-inset"> <label class="item-input-wrapper"> <i class="icon ion-ios-search placeholder-icon"></i> <input ng-model="pesquisar" placeholder="Pesquisa rápida..."> </label> </div> <ion-content class="padding"> <ion-list style="margin-bottom:120px !important"> <ion-item class="item item-thumbnail-left" ng-repeat="item in items | filter:pesquisar" type="item-text-wrap" ng-click="getEmpresa({{item.Empresa.id}})" > <img ng-src='{{item.Empresa.imagem}}'> <div style="font-weight:bold;" class="item-text-wrap">{{item.Empresa.nome}}</div> <div style="font-size:small" class="item-text-wrap">{{item.Empresa.tipo}}</div> <div style="font-size:small">{{item.Empresa.endereco}}</div> <div style="font-size:small">{{item.Empresa.telefone}}</div> <a href="tel:{{item.Empresa.telefone}}" class="button button-small button-balanced icon ion-ios-telephone"> </a> </ion-item> <ion-infinite-scroll on-infinite="loadMore();" distance="1%" ng-if='!moreData'></ion-infinite-scroll> </ion-list> </ion-content> </ion-view>
index.html
<body ng-app="starter" animation="slide-left-right-ios7"> <ion-nav-bar class="bar bar-header bar-assertive" align-title="center"> <ion-nav-back-button> </ion-nav-back-button> </ion-nav-bar> <ion-nav-view> </ion-nav-view> <ion-footer-bar class="bar-dark" ng-controller="AnuncioCtrl"> <div ng-model="loading" ng-show="loading"> <img src="img/loading.gif" width="30" height="30"> </div> <img ng-src="{{banner}}" style="max-width:100%;display:block;margin:0 auto"> </ion-footer-bar> </body>
Posts: 1
Participants: 1