How to create segments in ionic?


#1

I just want to create segments in my app, exactly in this article.

But, It will work only in ionic 2.
Is there any existing code, which will work in ionic 1 ?


#2

If you want to rebuild the kitten/puppy example:

Combine a button bar http://ionicframework.com/docs/components/#button-bar and a subheader-bar
http://ionicframework.com/docs/api/directive/ionHeaderBar/

The ion-content holds a list (with a filter) or many lists --> you show or hide (depending on the button you have clicked).