mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 05:24:19 +08:00
### What kind of change does this PR introduce? Bug fix — corrects a TypeScript initialization error in the Angular user management tutorial example. ### What is the current behavior? In the Angular tutorial's `AuthComponent`, `signInForm` is declared with a non-null assertion (`signInForm!: FormGroup`) and initialized inside `ngOnInit()`. This causes a TypeScript strict-mode error because `formBuilder` is used before the constructor runs. Developers following the tutorial encounter: > Property 'formBuilder' is used before being initialized. ### What is the new behavior? `signInForm` is now initialized in the constructor, matching the pattern already used by `AccountComponent` in the same example project. The non-null assertion is removed since the property is properly assigned during construction. ### Changes **`examples/user-management/angular-user-management/src/app/auth/auth.component.ts`** - Moved `signInForm` initialization from `ngOnInit()` into the constructor - Removed non-null assertion operator (`!`) from `signInForm` declaration - Reordered property declarations for consistency (`loading` before `signInForm`) ### Additional context The sibling `AccountComponent` already follows the correct pattern — initializing `updateProfileForm` inside the constructor (line 35). This PR aligns `AuthComponent` with that established convention. Closes #34392 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a loading indicator state to the authentication form. * **Refactor** * Restructured form initialization logic for improved component setup. <!-- end of auto-generated comment: release notes by coderabbit.ai -->