How to disable this formControl:
this.step1 = this.fb.group({
'name': ['', [Validators.required, Validators.minLength(1), Validators.maxLength(50)], disabled: true]...
I tried to add:
disabled: true
I'm not sure this works
'name': [{
value: '',
disabled: true
}, [Validators.required, Validators.minLength(1), Validators.maxLength(50)], disabled: true]
But I am sure this does
'name': new FormControl([{
value: '',
disabled: true,
validators: [Validators.required, Validators.minLength(1), Validators.maxLength(50)], disabled: true]
})
use disabled:true for this.
this.step1 = this.fb.group({
name: [{value:'name',disabled:true}, [Validators.required, Validators.minLength(1), Validators.maxLength(50)]],
lastname: [{value:'last name',disabled:true}, [Validators.required, Validators.minLength(1), Validators.maxLength(50)]]
})