我正在尝试(wget -O - pi.dk/3 || curl pi.dk/3/ ) | bash
收藏,但我无法做到。
请注意,我需要将ng-repeat
分配给deptData
,因为我想尝试一下,我需要它来测试它是否正常工作。感谢
跟进问题是否已解决:
我想要实现的是让st-safe-src
过滤器适用于多个表。如您所见,select
重复取决于table
。
我收到错误:dept in deptData
对象
Error: [ngRepeat:iidexp]
HTML
[
{
dept: "CASHE",
data: [
{
violationName: "No ID"
},
{
violationName: "Cutting class"
},
{
violationName: "Improper Uniform"
}
]
},
{
dept: "CBITE",
data: [
{
violationName: "No ID"
},
{
violationName: "No ID"
}
]
},
{
dept: "CCJE",
data: [
{
violationName: "Improper Uniform"
}
]
}
]
答案 0 :(得分:1)
ng-repeat遵循json数组的结构。
在第一个循环中,您声明代表数组的每个对象的structure(list(accountid = c(22, 22, 27, 28, 28, 30), firstname = c("Henk",
"Henk", "Tim", "Dean", "Dean", "Max"), lastname = c("Wilders",
"Wilders", "Sneijder", "Babel", "Babel", "Pele"), starttime = c("2017-12-13",
"2018-03-09", "2017-12-13", "2017-12-13", "2018-03-09", "2017-12-13"
), value = c(16, 7, 41, 7, 19, 16), value2 = c(23, 10, 47, 16,
20, 20), value3 = c("0", "0", "0", "0", "0", "0"), value4 = c("free_throw",
"free_throw", "free_throw", "free_throw", "free_throw", "free_throw"
), startdate = c("2017-12-13", "2018-03-09", "2017-12-13", "2017-12-13",
"2018-03-09", "2017-12-13"), fullname = c("Henk Wilders", "Henk Wilders",
"Tim Sneijder", "Dean Babel", "Dean Babel", "Max Pele"
), percentage = c(69.5652173913043, 70, 87.2340425531915, 43.75,
95, 80), points = c(NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,
NA_real_)), .Names = c("accountid", "firstname", "lastname",
"starttime", "value", "value2", "value3", "value4", "startdate",
"fullname", "percentage", "points"), row.names = c(NA, 6L), class = "data.frame")
。
此对象包含2个属性:dept
和dept
data
是您要在第二个ng-repeat上循环的数组。这给出了data
dept.data
function Main($scope) {
$scope.deptData = [
{
dept: "CASHE",
data: [
{
violationName: "No ID"
},
{
violationName: "Cutting class"
},
{
violationName: "Improper Uniform"
}
]
},
{
dept: "CBITE",
data: [
{
violationName: "No ID"
},
{
violationName: "No ID"
}
]
},
{
dept: "CCJE",
data: [
{
violationName: "Improper Uniform"
}
]
}
];
}
angular.module('test', []);
angular.module('test')
.controller('Main', Main);