@H_502_1@1、问题背景
@H_502_1@ AngularJS利用自带的指令,设计出无序列表
@H_502_1@
@H_502_1@2、实现源码
@H_502_1@
<!DOCTYPE html> <html> <head> <Meta charset="UTF-8"> <title>AngularJS之无序列表</title> <script type="text/javascript" src="../js/angular.min.js" ></script> <script> var app = angular.module("ulApp",[]); app.controller("ulCon",function($scope){ $scope.season = [ {times:"春季"},{times:"夏季"},{times:"秋季"},{times:"冬季"} ]; }); </script> </head> <body> <div ng-app="ulApp" ng-controller="ulCon"> <ul> <li ng-repeat="s in season"> {{s.times}} </li> </ul> </div> </body> </html>
@H_502_1@3、问题说明
@H_502_1@ ul是无序列表
@H_502_1@
原文链接:https://www.f2er.com/angularjs/149023.html