<form (submit)="onSubmit()"> <input [(ngModel)]="playerName"> </form> let playerName: string; onSubmit() { return this.playerName; }