直接上代码
<!Doctype html> <html> <head> <meta name = "description" content = "[ngrepeat in obj and arr]"> <script src = "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/Angurar.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min.min. <Title> js bin </title> </head> <body> <div ng-app = "myApp"> <div ng-controller = "testctrl"> {{test1}} <div> <label for = "" ng-repeat = "item in list1"> {item.id}} - {{item。 for = "" ng-repeat = "(key、value)in obj1"> {{key}} - {{{value}} </label> <p> </p>对于obj {{value.value}} </label> </div> </div> </div> </body> </html>JS
var app = angular.module( 'myApp'、[]); app.controller( 'testctrl'、function($ scope){$ scope.test1 = 'tt'; $ scope.list1 = [{id: '1'、value: 'seti'}、{id: '2'、balue: 'kuma' '' '' 3値: $ scope.obj1 = {'1': 'seti'、 '2': 'kuma'、 '3': 'cent'}; };});