在引导程序弹出窗口中使用ng-repeat

时间:2019-07-03 19:37:44

标签: angularjs angularjs-ng-repeat bootstrap-popover

我正在尝试创建一个时间轴,可以单击事件气泡以通过引导弹出窗口显示更多详细信息。问题是,我无法让ng-repeats在数据内容内部工作。我尝试将弹出式窗口内容定向到其自己的div,但不确定如何从此处启动ng-repeat。这是我的代码:

<ul class="timeline timeline-horizontal">
    <li class="timeline-item" ng-repeat="event in c.data.rpm_case.milestones | orderBy : 'milestone_start' track by $index">
      <a class="timeline-badge primary" 
         href="#my-popover-content" 
         title="{{event.milestone_name}}" 
         data-container="body"
         data-toggle="popover" 
         data-trigger="focus" 
         data-html="true"
         data-placement="bottom">
        <i class="glyphicon glyphicon-check"></i>
      </a>
   </li>
  </ul>

<script type="text/html" id="my-popover-content">
<ul>
    <li ng-repeat="task in event.tasks track by $index">
        <p>{{task.short_description}}</p>
        <p ng-if="task.task_state!='3'"><small class="text-muted"><i class="glyphicon glyphicon-calendar"></i> Due Date: {{task.task_due_date}}</small></p>
        <p ng-if="task.task_state=='3'"><small class="text-muted"><i class="glyphicon glyphicon-ok-sign"></i> Completed {{task.updated | date: fullDate}}</small></p>
  </li>
</ul>
</script>

这可能吗?谢谢!

0 个答案:

没有答案