G
G
GaserV2015-10-23 12:21:50
JavaScript
GaserV, 2015-10-23 12:21:50

How to crop text in Angular?

I need to display a text preview in an article. I know how to jquery, but the data will be displayed using angular. Is it possible to somehow display the max. number of characters? If not, what is the right way to do it on jq?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lega, 2015-10-23
@GaserV

{{text.substring(0, 30)}}

S
Sergey, 2015-10-23
Protko @Fesor

https://docs.angularjs.org/api/ng/filter/limitTo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question