SHARE
TWEET

Untitled

a guest Jun 25th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Array[5]
  2.      0:Array[10]
  3.       0:Object
  4.       1:Object
  5.       2:Object
  6.       3:Object
  7.       4:Object
  8.       5:Object
  9.       6:Object
  10.       7:Object
  11.       8:Object
  12.       9:Object
  13.       10:Object
  14.     1:Array[2]
  15.       0:Object
  16.       1:Object
  17.      
  18. <div ng-repeat="item in array">
  19.  <div ng-repeat="object in item">
  20.    {{object.name}}
  21.  </div>
  22. </div>
  23.      
  24. <div ng-app="app">
  25.   <div ng-controller="ctrl">
  26.     <div ng-repeat="array in arrays">
  27.       <div ng-repeat="v in array">      
  28.          {{v.name}}
  29.       </div>
  30.     </div>
  31.   </div>
  32. </div>
  33.      
  34. var app = angular.module('app', []);
  35.  
  36.     app.controller('ctrl', ['$scope', function($scope)
  37.     {          
  38.        $scope.arrays = [
  39.         [{'name':'a1'}, {'name':'a2'}],
  40.         [{'name':'a3'}, {'name':'a4'}]
  41.        ];
  42.     }]);
  43.      
  44. $scope.meuArray = [];
  45.  
  46. //meu primeiro array é esse seu array que tem outros arrays dentro
  47.  
  48. angular.forEach(primeiroArray, function(arrays) {
  49.     $scope.meuArray.push(arrays)
  50. }
  51.      
  52. <div ng-repeat="obj in meuArray">
  53.      {{obj.algumAtributo}}
  54. <div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top