Angular limitTo过滤器,如何防止Word换行?

时间:2017-10-03 10:22:57

标签: angularjs filter

我使用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&apos;est with special chars &quot;";

});

我想避免在截断时显示html实体,

是否有任何过滤器可防止自动换行?

0 个答案:

没有答案