ngModel
is displaying the value, however it is still considered empty by required validation. Adding an empty space after the value resolves this issue.
Snippet to retrieve the name
<div (click)="getName(item.name)"></div>
<input matInput [(ngModel)]="data.name" value="{{name}}">
Component.ts
name: string;
data: Data
getName(nm) {
this.name = nm;
}