/col-1-2/ is just from my plunker, my sample. Pretty sure Ionic has some sort of a grid too, you'll have to read the docs about it.

On 26.06.2016 10:26, Shiva Rowshan rad wrote:
Thanks , I used col-1-2 class but it only shows one column in grid :( I cant understand why this happens.

On Sunday, June 26, 2016 at 11:32:45 AM UTC+4:30, Zlatko Đurić wrote:



    On Saturday, June 25, 2016 at 9:08:30 PM UTC+2, Shiva Rowshan rad
    wrote:

        Hi everyone
        I have a Json Data which I showed in rows with 2 columns. I
        put a search box to show the search results by filter . but it
        does not work correctly .
        Sometimes it shows both data and its next index , sometimes it
        shows the data in both columns of a row and sometimes it shows
        nothing at all.
         How should I make it correct ?



    So two things to note here:

    1. I don't know what your problem exactly is - perhaps you're
    matching stuff from "book.type", "book.author" or whatever else
    property, not just name.

    If you want to limit the search, just limit it to your name
    property directly:
        <input ng-model="search.name <http://search.name>"></label><br>
        <tr ng-repeat="item in items | filter:search">
            {{ item.name <http://item.name> }} - {{ item.type }}
        </tr>



    2. Layout - you have a weird thing there with ng-if:

         ng-if="$index%2==0"

    That would limit you to only show every second row of the array
    (filtered or full, regardless). Why is that? Are you trying to lay
    the data out in two columns?
    Why not simply use some simple grid?

    Like:

        <div class="results grid">
          <div class="col-1-2" ng-repeat="item in items">
            <span>{{ item.name <http://item.name> }}, {{ item.type
    }}</span>
          </div>
        </div>

    See this plunkr: http://plnkr.co/edit/7jDQfD3OA9QkP1aYoM0L
    <http://plnkr.co/edit/7jDQfD3OA9QkP1aYoM0L>

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/7JhHnjSm6SA/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to