文章详情页
angular.js - AngularJs ng-repeat指令 如何取Json对象渲染到前端模板?
浏览:329日期:2024-09-30 13:13:59
问题描述
1.后台已生成Json对象,js已经获取,前端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; });});
下面是页面输出
请教我如何只取a.spd1name的值
问题解答
回答1:{{x}} 改成{{x.apd1name}}
相关文章:
1. docker 17.03 怎么配置 registry mirror ?2. tp6 事务闭包操作问题3. python打开.py文件的时候出现window无法打开该文件是怎么回事呢?4. 主从复制 - MySQL 主从延迟 300s 以上,求大神解答5. docker gitlab 如何git clone?6. web服务器 - ubuntu下布置apache加wsgi加python7. css - 图片的宽度发生变化而高度却没有相应变?8. dockerfile - 为什么docker容器启动不了?9. javascript - sublime快键键问题10. javascript - 微信小程序 如何实现这种左滑动出现删除的办法?有相关api吗?
排行榜

网公网安备