Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to specify max number of character angular mat input

<mat-form-field hintLabel="Max 300 characters">
<input matInput #input maxlength="300" placeholder="Enter some input">
<mat-hint align="end">{{input.value?.length || 0}}/300</mat-hint>
</mat-form-field>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #max #number #character #angular #mat #input
ADD COMMENT
Topic
Name
5+7 =