Skip to content Skip to sidebar Skip to footer

Ion-item Onclick Show Deteil Info In Another Div

I am now trying to use ionic to build my website. I have constructed my ion-list with ion-item ng-repeat to fetch the data array from my JavaScript file. And I would like to make i

Solution 1:

ion-list by default occupies the full width in mobile view. So, you need to replace the defaults but changing defaults is not a good solution. Either you need to create your own named views by angular or you need to follow ionic defaults, that is your wish. If you wish to do as your requirement in the question, create two div elements in the view side by side.

<body><divui-view="list"><ion-list><ion-item></ion-item></ion-list></div><divui-view="details"></div></body>

So, in list view, display your list and hide the details view by default. When you click on the list item show details view. May be this is good for browsers.

You need to use angular's ui-router to configuring states. Set same state for clicking on list-item. Changing the default behavior leads to spent more time. Mobile size configuration are not good for this. You also can do this by ionic side navigation menu if you are interested

Post a Comment for "Ion-item Onclick Show Deteil Info In Another Div"