I'm working with an angularjs app and I would like to set one of it's properties dynamically.
This is a piece of my model:
$scope.data_step_3 = {
'previous_insurance':{
'label':'Has this type of insurance ever been:',
'help_text':'',
'value':'',
'required':true,
'regex':''
},
'previous_insurance_description':{
'label':'If so, please explain (not applicable in Missouri):',
'help_text':'',
'value':'',
'required': true,
'regex':''
}
}
And I would to set the required property of previous_insurance_description dynamically. It would the true when previous_insurance.value == 'Non-reviewed'
How can I do that?
Thanks for any help