mercredi 29 avril 2015

Get Selected check box items from a click of a button

How can I go about getting checked check box item's ID in a repeated list from a click of a button and add items to a variable / Array for later use?

html:

<div ng-controller="movieController">
    <ul>
        <li ng-repeat="m in Movies">
                <input id="chkBox-{{ m.MovieID }}"
                       type="checkbox"
                />
        </li>
    </ul>
</div>

web API:

[{"MovieID":1,"Duration":"1:30:00"},
{"MovieID":2,"Duration":"1:30:00"},
{"MovieID":3,"Duration":"1:30:00"}]




Aucun commentaire:

Enregistrer un commentaire