首页 > Web开发 > 详细

angularjs中ng-repeat-start与ng-repeat-end用法实例

时间:2016-10-21 00:23:28      阅读:269      评论:0      收藏:0      [点我收藏+]
技术分享
<!DOCTYPE html>
<html lang="zh-CN" ng-app="app">
<head>
    <meta charset="utf-8">
    <title>ng-repeat-start 与 ng-repeat-end的用法</title>
    <link rel="stylesheet" href="../bootstrap.min.css">
</head>
<body>
    <h4>多行遍历的实现方式</h4>
    <ul ng-controller="PeopleController">
        <li ng-repeat-start="person in people">
            {{ person.name }}
        </li>
        <li>住在</li>
        <li>
            {{ person.city }}
        </li>
        <br ng-repeat-end>
    </ul>
    <script src="../angular.min.js"></script>
    <script>
        angular.module(‘app‘, [])
        .controller(‘PeopleController‘, [‘$scope‘, function($scope) {
            $scope.people = [
                {name: ‘张三‘, city: ‘广东‘},
                {name: ‘李四‘, city: ‘江西‘},
                {name: ‘王五‘, city: ‘东北‘}
            ]
        }])
    </script>
</body>
</html>
技术分享

 

angularjs中ng-repeat-start与ng-repeat-end用法实例

原文:http://www.cnblogs.com/yuanyingke/p/5982740.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!