ngFormBuilder
ngFormBuilder copied to clipboard
"component" not available in "custom validation"
For example in the definition of a custom validation of a select component you can see "The global variables input, component, and valid are provided.". But when I put
console.log(component)
valid = true
in the editor I get runtime "component is not defined" in red letters below the element. For global variable input the console.log works as expected. But what I would really like to have is a way to change the label of another element in the form depending on the input value of this select. Do you have a suggestion on how to accomplish this?
@StefanHoutzager you can use scope.component
for now, I'll add an issue to the backlog to make it a bit simpler. Thanks for the report!