首页 > 代码库 > angularjs中ng-repeat-start与ng-repeat-end用法实例
angularjs中ng-repeat-start与ng-repeat-end用法实例
<!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="http://www.mamicode.com/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="http://www.mamicode.com/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用法实例
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。