How to add a search bar to my home header (Ionic + Angularjs)

Asked

Viewed 222 times

1

I intend to create a Serach Bar in my home I’m struggling someone can help me ? I will leave here my Controller and my Views a Home .

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

2 answers

1


To filter your list, just use the filter

<input type="text" placeholder="Filtrar" ng-model="filtro">

<a ng-repeat="lista in listas | filter:filtro:strict">

See more: Angulasjs Filter

  • 1

    Valeuuu mano worked out

0

Try something like:

<div class="bar bar-subheader bar-light">
            <label class="item item-input item-floating-label">
                <i class="icon ion-search placeholder-icon"></i>
                <input type="text" size="100" ng-model="q" placeholder="Procurar" />
            </label>
        </div>

And no ng-repeat of your form: | filter:q

Or use this plugin:

http://market.ionic.io/plugins/ionic-filter-bar

Browser other questions tagged

You are not signed in. Login or sign up in order to post.