How to use Regex with ng-repeat in AngularJs?(如何在 AngularJs 中使用正则表达式和 ng-repeat?)

本文介绍了如何在 AngularJs 中使用正则表达式和 ng-repeat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 ng-repeat 中使用正则表达式.我已经尝试了以下代码,但它不起作用.

I want to use regex in ng-repeat. I have tried the following code but its not working.

<div ng-repeat="user in users | filter:{'type':/^c5$