Display the count of words that are overflowed in AngularJS

I'm having overflowed text and I want to display the number of words that are hidden by overflow.

For example: I'm having the string: I want to see the overflowed words that are hidden in here. And my div can only contain 3 words. So I want to see: I want to +9.

1 answer

  • answered 2020-01-16 09:49 Ibrahem Uwk

    You can create a variable that hold the length of the hole text minus the length of the text that can view in your case "I want to" is 9 chars then


    and display $scope.hiddenChars value in case it is greater than zero