Ios segment control with filters


#1

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


#2

Please share an image of what you mean.

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


#3

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


#4

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


#5

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


#6

С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…


#8

Nothing has changed :frowning:


#9

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.


#10

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


#11

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


#12

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…