标签:lis ng-repeat on() 功能 break function style ret ase
1. 枚举过滤器
var AppFilters = angular.module(‘illCaseListApp.filters‘, []); AppFilters..filter(‘gender‘, function() { return function(input) { var array=new Array("未知的性别","男","女","未说明的性别"); if (input) { switch(input) { case 0: case 1: case 2: return array[input]; break; case 9: return array[3]; break; default: return "error"; } } } })
在ng-repeat中
<td>{{medicalCardResultModel.gender|gender}}</td>
标签:lis ng-repeat on() 功能 break function style ret ase
原文地址:http://www.cnblogs.com/yangfei-beijing/p/6605420.html