children
배열을 사용하여 상위 마일스톤을 해당 작업과 관련시키는 것을 확인했습니다. 문제를 해결하기 위해 그 반대의 조치를 취할 수 있습니다. 어린이 작업을 부모와 연관 지으십시오. 하위 작업 내에 parent
필드를 사용하십시오.
$scope.data = [
{
name: 'Milestone 1', //name of milestone
//tasks inside this milestone
content: '<i class="fa fa-map-marker" ng-click="scope.handleRowIconClick(row.model)"></i> {{row.model.name}}' // no need to send this from backend
},
{
parent: 'Milestone 1', name: 'Task 11', tooltips: true, tasks: [
{
id: 'work_111', //id of task 11
name: 'Work 111', // display name for this task
color: '#a61229', //the time color for this task
from: '2017-05-01T00:00:00', //start date, it must be a timestamp
to: '2017-05-31T23:59:00' //end date, it must be a timestamp
}
]
}];
문제를 해결하는 working plunkr을 참조하십시오. WORKING PLUNKR
매력과 같은 작품. 고맙습니다! –