Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
122
rated 0 times [  127] [ 5]  / answers: 1 / hits: 24859  / 9 Years ago, thu, august 6, 2015, 12:00:00

I'm working with AngularJS and Ionic, I'm using the ng-bind-html to pull data from a rest API. I want to limit the amount of characters but also have three dots after the characters to show the user there is more to read...



So far I have:



<p ng-bind-html=item.excerpt | limitTo: 100></p>


But this just limits the characters and cuts them off.


More From » angularjs

 Answers
63

Fixed this with the https://github.com/sparkalow/angular-truncate. Real simple and easy to use and it can be used with ng-bind-html


[#65517] Tuesday, August 4, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
miranda

Total Points: 655
Total Questions: 110
Total Answers: 121

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
miranda questions
Sun, Jun 6, 21, 00:00, 3 Years ago
Tue, Mar 16, 21, 00:00, 3 Years ago
Sun, Feb 7, 21, 00:00, 3 Years ago
Mon, Jan 18, 21, 00:00, 3 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
;