i have long text like that :-
\"5 Simple Steps to Improve Patient Experience5 Simple Steps to Improve Patient Experience5 Simple Steps to Improve Patient Experience5 Si
Yes, this is totally possible with AngularJS -- but most of the solution is actually CSS.
You'll be able to do this mostly through CSS. First, HTML/CSS doesn't really have a concept for how many lines a bunch of text is taking up. You can get the behavior you want by setting the height of a container element and the line-height of your text on the CSS line-height
. For your default state, set the height based on two times your line height and set the overflow
to hidden. Then you just need have your button conditionally apply a class that expands the height of the container and sets the overflow
to visible: