Mpondomise Mpondomise - 3 months ago 24
AngularJS Question

angularjs nested ng-repeat of checkbox

I have the following ng-repeat list. I want to convert it to checkboxes.

Currently, it is repeating the category headings in myJSON.mylist and then repeating each subitem in each category in list mode.

How can I convert the list type into checkbox type, so that ONLY subitems can be chosen?

<ul ng-repeat="s in myJSON.mylist">
<li type="checkbox"> {{s.item}}</li>
<ul >
<li type="checkbox" ng-repeat="subitem in s.subitems">

here is a similar example.


you can go like this:

<div ng-repeat="sin myJSON.mylist">
    <div > {{s.item}}</div>
    <ul >
        <li ng-repeat="subitem in s.subitems">
            <input type="checkbox" name="myname"