Show more / show less on <p>

hey,
Is there a way to do it on ionic 2 , typescript ?
Example :
https://rawgit.com/lorenooliveira/ng-text-truncate/master/demo1.html

Look at the documentation for Angular2 pipes.