我有一个包含重复项目的数组。我想通过ng-repeat遍历我的数组中的所有项目。但是我无法显示重复的项目,这些项目在我的数组中是重复的值。我可以显示重复的项目用ng-repeat?
答案 0 :(得分:3)
您可以在 for i := len(slice) - 1; i > 0; i-- {
j := rand.Intn(i + 1)
slice[i], slice[j] = slice[j], slice[i]
}
track by $index
ng-repeat
如果您向OP添加代码,我将能够提供更多优势。