var app = angular.module(‘myApp‘, []);app.controller(‘myCtrl‘, function($scope) {});app.filter(‘myfilter‘, function() { //可以注入依赖 ???return function(text) { ???????var newArguments= Array.prototype.slice.call(arguments); ???????return text+newArguments.join(‘,‘); ???}});
angularJS自定义过滤器
原文地址:https://www.cnblogs.com/zhuhb/p/8403462.html