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.
Hi bengtler, I have something like this http://codepen.io/Hin/pen/VLVLrJ, can you edit my code in codepen?
thanks
but the laziness most of the ionic forum users is tooo dammn high
nice work, Thanks a lot!
Ok,Just take a look here http://codepen.io/HelloYu/pen/vOQNXX
Nice work jeffrey, thank you for your help as well