HLJ 发布于
2018-08-15 12:41:28

AngularJS小写过滤器代码

AngularJS小写过滤器代码

html代码:
<body ng-app="AngularlowercaseApp">
<div ng-controller="lowercasectrl">
  <ul ng-repeat="user in users  ">
    <li>{{user.name | lowercase }}</li>
  </ul>
</div>
</body>
JavaScript代码:
<script>
var app = angular.module("AngularlowercaseApp", []);
app.controller("lowercasectrl", function ($scope) {
  $scope.users = [{
      name: "Anil Singh",
      age: 30
    }, {
      name: "SURESH DASARI",
      age: 29
    }, {
      name: "ROHINI Alavala",
      age: 29
    }, {
      name: "Praveen Kumar",
      age: 24
  }];
});
</script>
当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2018-08-15/89.html
最后生成于 2024-05-27 22:52:53
此内容有帮助 ?
0