Search code examples
angularjscordovaonsen-ui

OnsenUI search example


I've found OnsenUI for develop with Cordova and I'm testing their components

http://onsenui.io/guide/components.html

I stop in ons-search-input

<ons-navigator title="Search Input">
   <ons-search-input 
       ng-model="searchText" 
       placeholder="Search">
   </ons-search-input>
</ons-navigator>

But I don't know how it works, for example, within a list (ons-list), is there any example??

Thanks


Solution

  • Just put it in ons-list

    <ons-navigator title="Search Input">
      <ons-list>
        <ons-list-item style="padding-top: 5px">
         <ons-search-input
            ng-model="searchText" 
            placeholder="Search">
         </ons-search-input>   
        </ons-list-item>
    
        <ons-list-item>
          Item 1
        </ons-list-item>
        <ons-list-item>
          Item 2
        </ons-list-item>
        <ons-list-item>
          Item 3
        </ons-list-item>
      </ons-list>
    
    </ons-navigator>
    

    Here is the plunkr

    http://plnkr.co/edit/OkASen?p=preview