diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-03-22 16:32:51 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-03-22 16:32:51 +0200 |
| commit | e4099fbf0ec62ecf38c9be6eba784cac4e6a3479 (patch) | |
| tree | 8527fdb4c93b5f6695c5f63cbe821b8df25e13b5 /src | |
| parent | c95ced58bab3bbf84e2be372b8c138051d983da9 (diff) | |
| download | DevHive-Angular-e4099fbf0ec62ecf38c9be6eba784cac4e6a3479.tar DevHive-Angular-e4099fbf0ec62ecf38c9be6eba784cac4e6a3479.tar.gz DevHive-Angular-e4099fbf0ec62ecf38c9be6eba784cac4e6a3479.zip | |
Fixed form errors in profile settings component
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/components/profile-settings/profile-settings.component.ts | 17 |
1 files changed, 17 insertions, 0 deletions
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); |
