Solution: Angular 6 and read input

Development | Web Development
  • 5.0 (1 ratings)
Last updated 12/2018
Author
Marian Rohal
NRN
  • 5.0
Description
Hi, how i want read input in form. But only one input in formular. I use {NgForm} and read complet form,. Is something easier? Thanks 
Attachments
No attachments.
Solutions
<form (submit)="onSubmit()">
   <input [(ngModel)]="playerName">
</form>

let playerName: string;
onSubmit() {
  return this.playerName;
}

on August 09th, 2018 (9:16 am)
What masters said
You must sign in to comment!!
All comments
Super, it works .. Thank you
on December 15th, 2018 (11:12 pm)
We use cookies to give you the best possible experience on our site. By continuing to use the site you agree to our use of cookies. Find out more Accept