I am creating an application in ionic2, I have a page in which I have 5 checkboxes with the different label and 2 toggles with the different label and at the end of the page ‘Submit’ button is there.
so my question is:
- When to click on the Submit button, I want to check the state of each checkbox whether it is 'checked = true/false’
Similarly, for toggles whether it is 'checked = true/false’
i.e. The state of 5 checkboxes and 2 toggles at the same time.
I may do this by using ‘ionChange’, but then I have to write ‘ionChange’ method 5 times and check the status of all the checkboxes. But what I want is. Is there any short way to code, to get the state of all checkboxes at the same time when to click on ‘submit’.
Thanks in advance