控制器:$scope.dataList=[
{"dataClass":"0","dataName":"A1"},
{"dataClass":"0","dataName":"A2"},
{"dataClass":"1","dataName":"B1"},
{"dataClass":"1","dataName":"B2"},
{"dataClass":"2","dataName":"C1"},
{"dataClass":"2","dataName":"C2"}
]
HTML模板:
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
帮你写了个过滤器,把指定的dataClass去掉了:
过滤器接收3个参数,原数组,要过滤的key,以及指定的key值。
加花括号就可以了