From e4099fbf0ec62ecf38c9be6eba784cac4e6a3479 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 22 Mar 2021 16:32:51 +0200 Subject: Fixed form errors in profile settings component --- .../profile-settings/profile-settings.component.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/app/components/profile-settings/profile-settings.component.ts') diff --git a/src/app/components/profile-settings/profile-settings.component.ts b/src/app/components/profile-settings/profile-settings.component.ts index 7863258..44ea8bb 100644 --- a/src/app/components/profile-settings/profile-settings.component.ts +++ b/src/app/components/profile-settings/profile-settings.component.ts @@ -50,6 +50,23 @@ export class ProfileSettingsComponent implements OnInit { this.availableTechnologies = []; this.newProfilePicture = new File([], ''); + // Initializing forms with blank (default) values + this.updateUserFormGroup = this._fb.group({ + firstName: new FormControl(''), + lastName: new FormControl(''), + username: new FormControl(''), + email: new FormControl(''), + password: new FormControl(''), + languageInput: new FormControl(''), + languages: new FormControl(''), + technologyInput: new FormControl(''), + technologies: new FormControl('') + }); + this.updateProfilePictureFormGroup = this._fb.group({ + fileUpload: new FormControl('') + }); + + this._userService.getUserByUsernameRequest(this._urlUsername).subscribe({ next: (res: object) => { Object.assign(this.user, res); -- cgit v1.2.3