Profile

The Angular Profile Component provides a user interface for viewing and editing user profile information. It utilizes the base-model-form component for a consistent form layout. The profile fields are customizable, and specific configurations can be provided to control the appearance and behavior of the form.

Usage

  1. Import the component in your Angular module:
import { ProfileComponent } from './path/to/profile.component';

@NgModule({
  declarations: [ProfileComponent],
  // Other module configurations...
})
  1. Include the <base-profile>tag in your HTML:
<base-profile [config]="yourProfileConfig"></base-profile>

Notes

  • The component relies on the base-model-form component for rendering the user profile form.
  • Profile fields such as avatar, email, first name, last name, username, and password are customizable through the profileConfig object.
  • The form supports a cropping feature for the avatar image.
  • The `updateSessionUser() function fetches the latest user data from the database and updates the user information in the session after form submission.

Feel free to customize the component further based on your application's design and specific requirements.

Table of Contents