ng-repeat: access key and value for each object in array of objects

前端 未结 6 815
清歌不尽
清歌不尽 2020-12-04 15:06

I have an array of objects and I am using an ng-repeat to iterate over them, which is easy. The array looks something like this:

$scope.steps =         


        
6条回答
  •  臣服心动
    2020-12-04 15:44

    Here is another way, without the need for nesting the repeaters.

    From the Angularjs docs:

    It is possible to get ngRepeat to iterate over the properties of an object using the following syntax:

    {{key}} : {{value}}

提交回复
热议问题