Controller中使用过滤器

时间:2023-03-09 00:59:25
Controller中使用过滤器

app.controller('myCtrl',function($scope,$filter){     ...

$filter('过滤器名称')(需要过滤的对象,参数1,参数2,...);

... });

$filter('currency')($scope.amount,'$USD');