我使用angular limitTo过滤器来显示较少的Text:
<body ng-app="m">
<div ng-controller="c">
<h1>angular</h1>
<p ng-bind-html="desc | limitTo:22"></p>
</div>
</body>
// Angular application
var app = angular.module("m",['ngSanitize']);
app.controller("c",function($scope){
$scope.desc = "this is a t'est with special chars "";
});
我想避免在截断时显示html实体,
是否有任何过滤器可防止自动换行?