Show selected ionic list view

I have created this (demo) 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.

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

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);
        };
    };

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. :smile:

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

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

2 Likes

nice work, Thanks a lot! :smile:

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

1 Like

Nice work jeffrey, thank you for your help as well :slight_smile: