直接上代码
<!DOCTYPE html> <html> <head> <meta name="description" content="[Ngrepeat in obj and arr]"> <script src="/UploadFiles/2021-04-02/angular.min.js">JS
var app = angular.module(‘myApp‘, []); app.controller(‘testCtrl‘, function ($scope) { $scope.test1 = ‘tt‘; $scope.list1 = [{ id: ‘1‘, value: ‘seti‘ }, { id: ‘2‘, value: ‘kuma‘ }, { id: ‘3‘, value: ‘cent‘ }]; $scope.obj1 = { ‘1‘: ‘seti‘, ‘2‘: ‘kuma‘, ‘3‘: ‘cent‘ }; $scope.obj2 = { ‘ins‘:{text:‘seti‘, value:‘s1‘}, ‘abc‘:{text:‘kuma‘, value:‘s2‘}, ‘coln‘:{text:‘cent‘, value:‘s3‘} }; });
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“Angular ng-repeat 对象和数组遍历实例”评论...