• Use in html files and in js files
$scope.form_time = $filter('date')($scope.time, 'yyyy-MM-dd HH:mm:ss');<p>{{time | date: 'yyyy-MM-dd HH:mm:ss'}}</p>•Internal filters and custom filters
.filter('my_data_format',[function(){ return function(data,str,ss){ console.log('data: ',data,' str: ',str,' sss: ',arguments[2]); }}]);//var1 is the first parameter data, 123 is the second parameter str, this is the third parameter <p>{{var1 | my_data_format : 123 : 'this'}}</p>//process the incoming data.filter('my_data_format',[function(){ return function(data,str){ var arr=[]; angular.forEach(data, function(one_list){ if(one_list.status == str){ arr.push(one_list); } }); return arr; }}]);//Filters can be used in bound values, or in ng-if="(lists | my_data_format: '2').length>0", and ng-show, etc.; similar expressions. As a judgment statement <p ng-repeat = "list in lists">Name:{{list.name}}, number of people{{(lists | my_data_format: '2').length}}</p>The above article in-depth understanding of angularjs filter is all the content I have shared with you. I hope you can give you a reference and I hope you can support Wulin.com more.