I need to set the default image path in formbuilder, but with an exception. I also tried an empty string and null.
buildForm() {
this.userForm = this.formBuilder.group({
location_id: this.formBuilder.control(null),
image: this.formBuilder.control('assets/images-demo/avatars/user.png'),
});
}
ERROR DOMException: Failed to set the 'value' property to "HTMLInputElement": this input element accepts a file name that can only programmatically set an empty string.
source
share