How to truncate text in Angular2?

asked8 years ago
last updated8 years ago
viewed227.1k times
Up Vote203Down Vote

Is there a way that I could limit the length of the string to a number characters? for e.g: I have to limit a title length to 20 {{ data.title }}.

Is there any pipe or filter to limit the length?