Answer the question
In order to leave comments, you need to log in
How to count how many rows a user has written using Angular?
Is it possible with Angular to count how many lines a user has written in a textarea element, or how can this be done gracefully by other means?
Answer the question
In order to leave comments, you need to log in
<body ng-app>
<textarea ng-model="text"></textarea>
<span>{{text.split('\n').length}} lines</span>
</body>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question