用动态数据填充html两层div表

时间:2017-07-11 06:54:37

标签: html angularjs

我有一张这样的桌子。 。 :

    <h3>Testing</h3>
<div class="rTable">
    <div class="rTableRow">
        <div class="rTableHead"><strong></strong></div>
        <div class="rTableHead" ng-repeat="entype in EnvironmentTypes"><span style="font-weight: bold;" >{{entype.Name}}</span></div>
    </div>
    <div class="rTableRow" ng-repeat="type in TestingTypes">
        <div class="rTableHead"><span style="font-weight: bold;">{{type.Name}}</span></div>
        <div class="rTableCell" ng-repeat="item in EnvironmentTypes" alue="0"><input type="text" ng-bind="getResult(entype,type)"></div>
    </div>

</div>

从get方法中,我从数据库中获取值并将其存储在范围变量中。

releaseService.getTestingbyRelease(id).then(function (info) {
       if (info !== undefined) {
                 $scope.Testing = info;

       }
 }).catch(function (exception) {
         console.error(exception);
 });

$ scope.Testing有一个数组,其中包含测试类型id(标题为down)和id为环境。

我需要通过检查顶部和侧面标题来填充表中的文本框。我不知道这是否有意义......但我所拥有的是here

我已经尝试添加ng-bind函数来检查迭代值id并分配值,但它不起作用。现在写一下,测试数组有一条记录,其中包含TestingTypeId:1和EnvironmentId:1。因此,在表格中,应填充Dev / QE下的第一个单元格。

我应该如何做这项工作?

0 个答案:

没有答案