文章詳情頁(yè)
angular.js - AngularJs ng-repeat指令 如何取Json對(duì)象渲染到前端模板?
瀏覽:181日期:2024-09-30 13:13:59
問(wèn)題描述
1.后臺(tái)已生成Json對(duì)象,js已經(jīng)獲取,前端ng-repeat 不知如何獲取
下面是前端代碼
<p ng-repeat='x in data track by $index'><td>{{x}}</td></p>
下面是js代碼
var app = angular.module(’ngApp’, []);app.controller(’productPackagePullController’, function ($scope,$http) { $http.get(’?/vProduct/getSpecsDistinct/’,{params: {id: 8147}}) .success(function (data) { $scope.data = data; });});
下面是頁(yè)面輸出
請(qǐng)教我如何只取a.spd1name的值
問(wèn)題解答
回答1:{{x}} 改成{{x.apd1name}}
相關(guān)文章:
1. 為什么我ping不通我的docker容器呢???2. nignx - docker內(nèi)nginx 80端口被占用3. python3.x - python連oanda的模擬交易api獲取json問(wèn)題第五問(wèn)4. angular.js - angular內(nèi)容過(guò)長(zhǎng)展開收起效果5. java - SSH框架中寫分頁(yè)時(shí)service層中不能注入分頁(yè)類6. 關(guān)于docker下的nginx壓力測(cè)試7. docker鏡像push報(bào)錯(cuò)8. javascript - js代碼獲取驗(yàn)證碼倒計(jì)時(shí)問(wèn)題9. dockerfile - [docker build image失敗- npm install]10. html5 - 百度echart官網(wǎng)下載的地圖json數(shù)據(jù)亂碼
排行榜

熱門標(biāo)簽