将参数一参数传递给模态

时间:2018-09-09 17:12:39

标签: javascript html

在我的HTML中,我有一个需要循环的数组:

<tr ng-repeat="Incident in vm.Incidents">
  <td>
    <a data-target="#CheckerInformationListModal" data-toggle="modal" class="MainNavText" id="MainNavHelp" href="#CheckerInformationListModal">View ({{Incident.CheckerInformationList.length}})</a>
  </td>

现在在我的模态中,我需要一种循环Incidents[I think I need the index of the array that I clicked above].CheckerInformationList的方法:

<div id="CheckerInformationListModal" class="modal fade" role="dialog">
  <table class="table">
    <tbody>
      <tr ng-repeat="checkerInfo in vm.NapIncidents[????].CheckerInformationList">
        <td>test</td>
      </tr>
    </tbody>
  </table>

数据的结构是这样的:

<Incidents>
<Incident>
    <Incident>Zahlunsverbindungen ändern</Incident>
    <IncidentID>0002724285</IncidentID>
    <NapID>4214</NapID>
    <NapStatus>erfasst</NapStatus>
    <Username>silvat</Username>
    <NumberOfApprovers>2</NumberOfApprovers>
    <RecordDate>12-12-2018</RecordDate>
    <CheckerInformationList>
        <CheckerInformation>
            <Checker>asfasafs</Checker>
            <Date>21-09-2018</Date>
            <TimeOfDay>12:12:36</TimeOfDay>
            <CheckerInfo>Something</CheckerInfo>
            <CheckerInfoText>Something else</CheckerInfoText>
        </CheckerInformation>
    </CheckerInformationList>
    <Alterations>
        <Alteration>
            <Field>IBAN</Field>
            <OldValue>DE12345</OldValue>
            <NewValue>DE54321</NewValue>
        </Alteration>
    </Alterations>
</Incident>

0 个答案:

没有答案