我收到此错误;
Cannot read property '0' of null
(对于'0','1','2','3'......等)在我一天中的每个24小时内一次。然后是第 8 行、第 9 行、第 10 行和第 11 行,我在日历上有事件。
这是我的日历日视图模板
<table ui-tree="treeOptions">
<tbody>
<!-- Builds Day View with one <tr> for each hour(24 hrs) in rows model -->
<tr ng-repeat="tm in rows track by $index" ng-model="rows" ui-tree-nodes="">
<td class="calendar-cell" ui-tree-node>
<!-- hourTouch() counts the touch events, once shows <p>Signup</p>, twice -->
<!-- shows <div class="finish-time"> which is my draggable element -->
<!-- tm.events is an array of objects with the event detail properties -->
<div class="add_event_shade"
ng-if="tm.events"
on-touch="hourTouch($event)"
ng-model="tm.events"
ui-tree-nodes="">
<p style="display:none;"
ng-model="volunteerStart">
Signup
</p>
<div class="finish-time"
style="display:none";
ui-tree-node>
Finish: {{ displayEnd}}
</div>
</div>
<div ng-class="{'calendar-event-wrap': tm.events}"
ng-show="tm.events">
<!-- adds events to the calendar day view -->
<div ng-repeat="displayEvent in tm.events"
class="calendar-event"
ng-click="eventSelected({event:displayEvent.event})"
<div class="calendar-event-inner"></div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
在我的控制器中,我有我的 html 注释中描述的逻辑以及文档中显示的全套$scope.treeOptions = { accept, beforeDrag, removed
等。
我是否遗漏了一些我需要在控制器端做的事情,或者我在模板上设置了错误的 ui-tree 属性?