Dynamically generate materializecss checkboxes
<p>I am dynamically creating materializecss checkboxes through an ng-repeat. Problem is that in materialize, the 'for' on the checkbox label must correspond with the id on the <code>input</code> as such:</p>

<pre><code>&lt;div class="checkbox-patient-info-medical"&gt;
  &lt;input type="checkbox" id="medical-checkbox"&gt;
  &lt;label for="medical-checkbox"&gt; Prior Authorization Required*&lt;/label&gt;
&lt;/div&gt;
</code></pre>

<p>I am generating fields with an ng-repeat, and there is 1 textbox for each generated set of field. Code as follows:</p>

<pre><code>&lt;div class="medical-insurance-holder" ng-repeat="person in vm.myData[0].medicalInsuranceContainer track by $index"&gt;
  &lt;p class="patient-info-holder-text"&gt;
    RELATIONSHIP TO PATIENT:&amp;nbsp&amp;nbsp&amp;nbsp&lt;b&gt;{{person.relationshipToPatient}}&lt;/b&gt;
  &lt;/p&gt;
  &lt;p class="patient-info-holder-text"&gt;
    GROUP NUMBER:&amp;nbsp&amp;nbsp&amp;nbsp&lt;b&gt;{{person.groupNum}}&lt;/b&gt;
  &lt;/p&gt;
  &lt;p class="patient-info-holder-text"&gt;
    SUBSCRIBER D.O.B:&amp;nbsp&amp;nbsp&amp;nbsp&lt;b&gt;{{person.subscriberDob}}&lt;/b&gt;
  &lt;/p&gt;
  &lt;div class="checkbox-patient-info-medical"&gt;
    &lt;input type="checkbox" id="medical-checkbox"&gt;&lt;label for="medical-checkbox"&gt; Prior Authorization Required*&lt;/label&gt;
  &lt;/div&gt;
 &lt;/div&gt;
</code></pre>

<p>How can I change the <code>label for</code> and <code>id</code> of these checkboxes as the ng-repeat creates them? If I leave it as is, I can only click on the first checkbox created.</p>

<p>Thanks</p>