Generally, input can be restricted, but on the mobile terminal, you can continue to input if the input method exceeds the limit by typing a large paragraph of text and then clicking on the input text box. Is there any other way to keep track of the number of words entered by the user, and when the number of words entered by the user is exceeded, a prompt will pop up and the excess content will be deleted?
Use $watch
You can do this:
Bind a variable ng-model="length" to the textarea to count your current word count, and then bind a variable through ng-disabled="length>=140" to make the textarea disabled, or a pop-up box or something, anyway It is to monitor the word count of the output box.
<p ng-controller="myNoteCtrl">
</p>
<script>
</script>