如何将数组传递给AngularJS?

时间:2015-04-28 16:18:07

标签: javascript php arrays angularjs angularjs-ng-repeat

Array (
  0 => 
  Person::array (
      'name' => 'Paulo',
      'age' => 15,
    )


app.controller('myCrtl', function ($scope, $http, $timeout) {
 $http.get('ajax/getPerson.php').success(function(data){
 $scope.list = data;

...

我不希望数据在getPessoa.php中可见。还有其他一些方法可以移动AngularJS的数据(数组)以便隐藏它吗?

更新

$myArray;

<div ng-app="">
  <ul>
    <li ng-repeat="myArray in names">
      {{ names.x }}
      {{ names.y }}
    </li>
  </ul>
</div>

0 个答案:

没有答案