作者:浮云 | 来源:互联网 | 2023-02-01 17:42
我正在努力让阵列显示我想要的样子.
我有:
$scope.array = [["one", "two", "three", "four"], "five"],["six", "seven", "three", "four"], "two"]];
我想迭代并在第一个数组中显示字符串.我想展示:
一二三四有六七三四
目前我有以下内容:
{{a[0]}}
但它出现了:
["one", "two", "three", "four"]
["six", "seven", "three", "four"]
我已经尝试了一个过滤器来删除引号等,但它不断拉起另一个数组.
1> Hadi J..:
试试这样吧
并且数组应该是这样的
$scope.array =
[
[["one", "two", "three", "four"], "five"],
[["six", "seven", "three", "four"], "two"]
];
var app = angular.module('app', []);
app.controller('main', ['$scope', function($scope) {
$scope.array = [
[
["one", "two", "three", "four"], "five"
],
[
["six", "seven", "three", "four"], "two"
]
];
}]);