当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - ionic filter not working on my apk

问题描述:

i made a filter for my ionic app that work very well on google chrome (whit the ionic serve) but when i build my apk it doesnt do anything what could be the problem?

this is the search code

<ion-content class="fondo has-subheader">

<div class="bar subheader item-input-inset bar-light">

<label class="item-input-wrapper">

<input type="search" ng-model="busqueda" placeholder="Buscar">

</label>

</div>

<ion-list>

<ion-item class="button button-icon center" ng-repeat="cate in categorias | filter: busqueda" type="item-text-wrap" href="#/tab/categoria/{{cate.id}}" >

<img class="img_cat" ng-src="{{cate.imagen}}" >

<h2 class="categoria_n">{{cate.nombre}}</h2>

</ion-item>

</ion-list>

</ion-content>

网友答案:
<ion-content class="fondo has-subheader">     
    <div class="bar subheader item-input-inset bar-light">
        <label class="item-input-wrapper">
          <input type="text" ng-model="search" placeholder="Buscar">
        </label>
      </div>
      <ion-list>
        <ion-item class="button button-icon center" ng-repeat="cate in categorias | filter : search" type="item-text-wrap" href="#/tab/categoria/{{cate.id}}" > 
           <img class="img_cat" ng-src="{{cate.imagen}}" >
         <h2 class="categoria_n">{{cate.nombre}}</h2>
        </ion-item>
      </ion-list>
  </ion-content>

And try ui-sref in replace of href="#/tab/categoria/{{cate.id}}"

分享给朋友:
您可能感兴趣的文章:
随机阅读: