Ios segment control with filters

Hi Ionic Folks,

Do you guys have a example of how to implement ios segment control with filters. Plz share a demo link !

Thanks in advance

Please share an image of what you mean.

Maybe this : http://ionicframework.com/docs/components/#button-bar

ya the same thing… i’m a fresher to angularjs and ionic , so could you show me how to implement the filtes in that

Like this : http://codepen.io/calendee/pen/omtjf/

2 Likes

Try this one: https://github.com/tinga-dev/ti-ionic-segmented-control
Segmented control with iOS native look. Bower support and demo.

1 Like

Сan show my mistake?
This is my search.html

  <div class="modal" ng-controller="SearchCtrl as search">
   <p align="center">
    <ti-segmented-control on-select="buttonClicked($index)" style="width: 250px;">
      <ti-segmented-control-button class="button-balanced" title="'One'"></ti-segmented-control-button>
      <ti-segmented-control-button class="button-balanced" title="'Two'" selected></ti-segmented-control-button>
    </ti-segmented-control>
    </p>
    <h4> Index selected: {{search.selectedIndex}}</h4>
</div>

And search.coffee

  myApp.controller "SearchCtrl", SearchCtrl = () ->
    @buttonClicked = (index) ->
      $scope.selectedIndex = index
      $scope.$apply()
      return

Unfortunately, the index not displayed…

Nothing has changed :frowning:

Im sorry GoodBoris but Im not familiar with coffee script. Have you tried to log out index in buttonClicked function? Seems to be a scope problem.

I’ve solved my problem. I run $digest cycle manually.

Great! I saw your submitted issue at Github, I will look into it. Thx!

Thanks for ios segment, But i want to show view on segment click like tab click is there any way to show that, like given imag

e?
Thanks…