需求:angularJs之循环对象

angularJS(八)angularJsDemo之循环对象

实现如下

 angularJS(八)angularJsDemo之循环对象

代码如下:

<html>
<head>
<title>anguarJs入门小demo 循环对象数组</title>
<script src="angular.min.js"></script>	
<script>
//建立模块
var app=angular.module("myApp",[]);
//创建控制器   $scope控制层与视图层交换的桥梁
app.controller("myController",function($scope){
$scope.list=[
{name:"站三",shuxue:100,yuwen:100},
{name:"里斯",shuxue:70,yuwen:60}

];

});
</script>
</head>
<body ng-app="myApp" ng-controller="myController">
<table>
<tr >
<td>姓名</td>
<td>数学</td>
<td>语文</td>
</tr>
<tr ng-repeat=" s in list ">
<td>{{s.name}}</td>
<td>{{s.shuxue}}</td>
<td>{{s.yuwen}}</td>
</tr>
</table>
</body>
</html>

 

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-06-30
  • 2021-11-02
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2021-10-04
  • 2021-12-27
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
相关资源
相似解决方案