angular.js - AngularJs ng-repeat directive How to get the Json object and render it to the front-end template?
PHP中文网
PHP中文网 2017-05-15 17:04:03
0
1
605

1. The Json object has been generated in the background and the js has been obtained. I don’t know how to obtain the front-end ng-repeat


The following is the front-end code

<p ng-repeat="x in data track by $index">
<td>{{x}}</td>
</p>

The following is the js code

var app = angular.module('ngApp', []);

app.controller('productPackagePullController', function ($scope,$http) {

     $http.get('?/vProduct/getSpecsDistinct/',{params: {id: 8147}})
  .success(function (data) {
          $scope.data = data;
  });

});

The following is the page output

Please teach me how to get only the value of a.spd1name

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
PHPzhong

{{x}} changed to {{x.apd1name}}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template