Angular Two dimensional ng model
<p>I am trying to create a time table for class using html table,Each  tag contains one subject, the problem is for each cell i need to define unique ng model. the below code works fine for first  ,in all  tags from next , ng-model have same value. Here is my code</p>

<pre><code>    &lt;tr ng-repeat="day in days track by $index"&gt;
        &lt;td&gt;
         &lt;input ng-disabled="true" class="form-control" ng-model="weekdays[$index]"&gt;&lt;/td&gt;&lt;td ng-repeat="period in periods track by $index"&gt;&lt;input type="text"
        ng-model="timetable.subject[[$parent.$index][$index]]"
        name="name"
        uib-typeahead="onesectionsubject as onesectionsubject.subjectMaster.subjectName+'/'+onesectionsubject.subjectTeacher.firstName for onesectionsubject in onesectionsubjects | filter:$viewValue | limitTo:8"
        class="form-control" pattern="[A-Za-z0-9 ]*"
        uib-tooltip="Enter valid subject name"
        tooltip-enable="form.name.$invalid" autocomplete="off"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
</code></pre>