Skip to content

Instantly share code, notes, and snippets.

@romach
Last active September 5, 2020 17:41
Show Gist options
  • Save romach/cdefcbfd300b6cc3c07b2943d3ecc2e5 to your computer and use it in GitHub Desktop.
Save romach/cdefcbfd300b6cc3c07b2943d3ecc2e5 to your computer and use it in GitHub Desktop.
  • import FormsModule
  • create form with input and submit-type button
  • in <form>
    • create #f template variable and assign ngForm to it
    • add (ngSubmit) output, use f.value as handler's parameter
  • in <input> tag:
    • add name attribute
    • add ngModel attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment