# Show selected ionic list view

**URL:** <https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327>\
**Category:** ionic-v1\
**Created:** [July 28, 2015, 5:15am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327 "2015-07-28T05:15:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hin185](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hin185](https://forum.ionicframework.com/u/hin185)\
**Post date:** [July 28, 2015, 5:15am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/1 "2015-07-28T05:15:21Z")

</div>

I have created this ([demo](http://codepen.io/Hin/pen/VLVLrJ)) to demonstrate my problem. In this demo, I have a list page, a button at the header when the checkbox attribute is checked, a list view and also a checkbox next to my list view. I want to be able to show the selected list on my home.html when the submit button is click. I am not sure how to do that. Help will be appreciated.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [July 28, 2015, 5:54am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/2 "2015-07-28T05:54:58Z")

</div>

use a service or factory to store your checked data, because services are there to provide shared data to multiple module components like controllers.

You did something like that in you WebAPI-Factory. You could write all checked in this factory if you click on “Submit” like  
WebAPI.selectedData = // here the array with selected data

---

<div class="post-metadata">

**Author:** ![jeffreycolbert](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jeffreycolbert/32/89652_2.png) [@jeffreycolbert](https://forum.ionicframework.com/u/jeffreycolbert)\
**Post date:** [July 28, 2015, 5:59am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/3 "2015-07-28T05:59:31Z")

</div>

I did the similar function days ago, you can push you data into a array just like bellow codes

```
  for (var i = 0; i < $scope.selectHistoryCurveArea.length; i++) {
        if ($scope.selectHistoryCurveArea[i].isChecked) {
            selectedHistoryCurvePoints.push($scope.selectHistoryCurveArea[i].SpotName);
            selectedHistoryCurvePointsID.push($scope.selectHistoryCurveArea[i].SpotId);
        };
    };
```

---

<div class="post-metadata">

**Author:** ![hin185](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hin185](https://forum.ionicframework.com/u/hin185)\
**Post date:** [July 28, 2015, 6:03am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/4 "2015-07-28T06:03:19Z")

</div>

Hi Jeffreycolbert, thank you for your reply. Can you edited on my codepen? It is because I am not what is your selectHistoryCurveArea and sportname and stuff like that. Thanks. 😄

---

<div class="post-metadata">

**Author:** ![hin185](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hin185](https://forum.ionicframework.com/u/hin185)\
**Post date:** [July 28, 2015, 6:05am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/5 "2015-07-28T06:05:29Z")

</div>

Hi bengtler, I have something like this [http://codepen.io/Hin/pen/VLVLrJ](http://codepen.io/Hin/pen/VLVLrJ), can you edit my code in codepen?  
thanks 🙂

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [July 28, 2015, 6:16am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/7 "2015-07-28T06:16:12Z")

</div>

> **[Ionic List With CheckBoxes](https://codepen.io/anon/pen/mJQeRR)**
>
> An Ionic list directive Forked from \[Captain Anonymous\](http://codepen.io/anon/)'s Pen \[List: nightly\](http://codepen.io/anon/pen/jyfHs/). Forked fro...

but the laziness most of the ionic forum users is tooo dammn high

---

<div class="post-metadata">

**Author:** ![hin185](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hin185](https://forum.ionicframework.com/u/hin185)\
**Post date:** [July 28, 2015, 6:17am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/8 "2015-07-28T06:17:58Z")

</div>

nice work, Thanks a lot! 😄

---

<div class="post-metadata">

**Author:** ![jeffreycolbert](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jeffreycolbert/32/89652_2.png) [@jeffreycolbert](https://forum.ionicframework.com/u/jeffreycolbert)\
**Post date:** [July 28, 2015, 6:19am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/9 "2015-07-28T06:19:50Z")

</div>

Ok,Just take a look here [http://codepen.io/HelloYu/pen/vOQNXX](http://codepen.io/HelloYu/pen/vOQNXX)

---

<div class="post-metadata">

**Author:** ![hin185](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hin185](https://forum.ionicframework.com/u/hin185)\
**Post date:** [July 28, 2015, 6:27am UTC](https://forum.ionicframework.com/t/show-selected-ionic-list-view/29327/10 "2015-07-28T06:27:59Z")

</div>

Nice work jeffrey, thank you for your help as well 🙂
