Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reactive forms angular conditional disabling

checkValue(event: Event) {
  const ctrl = this.activityForm.get('docType');

  if (event.value === 'document') {
    ctrl.enable();
  } else {
    ctrl.disable();
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reactive #forms #angular #conditional #disabling
ADD COMMENT
Topic
Name
9+8 =