angularJS中ng-repeat遍历对象
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>angularjs中ng-repeat指令可以遍历对象</title> <script type="text/javascript" src="angular.js"></script> </head> <body ng-app ng-init="obj={name:'javascript',description:'页面脚本语言'}"> <ul> <li ng-repeat="(key,val) in obj"> {{key}}--{{val}} </li> </ul> </body> </html>