Skip to content

Instantly share code, notes, and snippets.

@codeepic
Created September 1, 2017 14:32
Show Gist options
  • Save codeepic/287ef7c7ed6bc49649c2274281e561b2 to your computer and use it in GitHub Desktop.
Save codeepic/287ef7c7ed6bc49649c2274281e561b2 to your computer and use it in GitHub Desktop.
Change values in Angular reactive form
this.form.setValue({search: ''}); //you have to provide all form controls
//OR
this.form.patchValue({search: ''}); //you can only provide 1 form control that you want to update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment