我需要在angular指令的link函数中使用$filter,但是没有办法将$filter作为参数传递给link函数.
app.directive('myDirective',function($compile) { return { restrict: 'A',scope: { ngModel: '=',},require: 'ngModel',link: function($scope,elem,attr,ctrl) { } }; });