angular js dynamic checkbox in ng-repeat
<p>I have services table with Id like  </p>

<pre><code>ID  Text
1   Cleaning
2   Washing
3   Folding
4   Drying
</code></pre>

<p>I retrieve them using api call and got the Json. I have another table in which I have prices for these services along with the product id, therefore while adding a product i want to add the services and their price. For this I retrieve derives and id using api call and iterate them in a table and the same iteration is used to generate text boxes to enter price of particular service. this is the table i made after long scratching my head.</p>

<pre><code>&lt;table id="dataTable" class="table table-striped table-bordered table-hover"&gt;
&lt;thead&gt;
    &lt;tr&gt;
        &lt;th&gt;
            Service
            &lt;i class="fa sort"&gt;&lt;/i&gt;
        &lt;/th&gt;
        &lt;th&gt;
            Price
            &lt;i class="fa sort"&gt;&lt;/i&gt;
        &lt;/th&gt;
    &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
    &lt;tr ng-repeat="Record in ServiceList"&gt;
        &lt;td&gt;
            &lt;span&gt;
                &lt;input id={{Record.ID}} ng-model="Services[Record.ID]" ng-checked="Record.ID==ProductProfile.PriceList.ServiceID" type="checkbox"&gt;
                &lt;label for={{Record.ID}}&gt;
                    {{Record.Text}}
                &lt;/label&gt;
            &lt;/span&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;span&gt; &lt;input id={{Record.ID}} ng-model="PriceList[Record.Price]" ng-disabled="!Services[Record.ID]" class="col-lg-12" type="number"&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;
</code></pre>

<p></p>

<p>The scenario is initially all the checkboxes (depending on number of services in service table) are unchecked and text boxes are disabled the user can tick the desired service this will enable the corresponding textbox once the user saves the record the list of selected services and their prices will be in ProductProfile.PriceList which has two attributes ServiceID and Price</p>

<p>I tried to do this by using for loop in my controller but failed</p>