I am a beginner with angular and I have been working on this code snippet:
<mat-form-field appearance="outline"
class="col-30" id="mat-identifier">
<mat-label>
{{'columns.dashboard.identifier' | translate}} {{selectedIdentifier?.mandatorieIdentifier ? '*' : ''}}
</mat-label>
<input matInput [value]="selectedIdentifier?.standardIdentifier"
formControlName="identifier" maxlength="255"
(input)="limitcarateres('identifier', 255, $event)">
<mat-hint *ngIf="showPackage!=true && selectedIdentifier && selectedIdentifier?.tag !== 'OTHERS'">
{{
selectedIdentifier?.standardIdentifier +
(dataCorrespondenceForm.get('identifier').value !== null && dataCorrespondenceForm.get('identifier').value !== ''
? '-' + dataCorrespondenceForm.get('identifier').value : '')
}}
</mat-hint>
</mat-form-field>
I need the input to display a default value set by a variable which cannot be deleted by the user. The user should only be able to write additional content after the default value. As an illustration, if # represents the default values and numbers represent user-inputted values, it should look like this: ####123456. The user can delete the numbers but not the #, as they were predefined.