<input type="text" placeholder="过滤字符串" ng-model="rpattern" >
<p ng-repeat="log in resultLogs | filter:pattern track by $index" >
<span ng-bind-html ="log | lineHightFont:rpattern"></span>
</p>
.filter('lineHightFont',['$sce',function($sce){
return function(content,match) {
if(match){
var contentHtml = content.replace(new RegExp(match,'g'),"<strong class='highlightLog'>"+match+"</strong>");
return contentHtml;
}else{
return content
}
}
}])