【发布时间】:2016-11-21 17:06:53
【问题描述】:
我正在使用 ng-repeat 并使用 materlize 的“条纹”类在有角度的页面中制作表格:
table.striped>tbody>tr:nth-child(odd) {
background-color: #f2f2f2
}
如果我不订购 ng-repeat,它可以正常工作,但如果我在 ng repeat (orderBy: 'Student.firstName') 中添加 orderBy,则只有第一行和最后一行显示为白色,表格的其余部分为阴影.我还尝试使用
$scope.questionScores = _.orderBy $scope.questionScores, 'Student.firstName'
并使用
$scope.questionScores = $filter('orderBy')($scope.questionScores, 'Student.firstName')
但是两者都会导致相同的错误,我可以在不弄乱css的情况下订购结果吗?
【问题讨论】:
标签: css angularjs angular-material materialize