Skip to content

Instantly share code, notes, and snippets.

@rlcc885
Created September 17, 2020 20:54
Show Gist options
  • Select an option

  • Save rlcc885/ad08a1fd9a4afecbba7752cb799aa49c to your computer and use it in GitHub Desktop.

Select an option

Save rlcc885/ad08a1fd9a4afecbba7752cb799aa49c to your computer and use it in GitHub Desktop.
Define as Read Only input (Angular)
//... ReadOnly // new FormControl({value: null, disabled: true}, Validators.required),
this.registerForm = this.formBuilder.group({
first_name: ['', Validators.required],
last_name: ['', Validators.required],
email: new FormControl({value: null, disabled: true}, Validators.required),
password: ['', Validators.compose([Validators.required, Validators.email])],
confirm_password: ['', Validators.required],
});
//... Get Values
this.registerForm.getRawValue();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment