角度二维ng模型

时间:2016-06-09 05:43:19

标签: angularjs

我正在尝试使用html表创建一个类的时间表,每个标记包含一个主题,问题是每个单元格我需要定义唯一的ng模型。以下代码首先工作正常,在下一个所有标签中,ng-model具有相同的值。这是我的代码

    <tr ng-repeat="day in days track by $index">
        <td>
         <input ng-disabled="true" class="form-control" ng-model="weekdays[$index]"></td><td ng-repeat="period in periods track by $index"><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">
        </td>
    </tr>

0 个答案:

没有答案