Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

update AuthComponent onInit

Attila Pápaic3fd3271a468
diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx
index f2126059188..4930812ee08 100644
--- a/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx
+++ b/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx
@@ -135,7 +135,7 @@ Let's set up an Angular component to manage logins and sign ups. We'll use Magic
Create an **AuthComponent** with `ng g c auth` Angular CLI command.
```ts title=src/app/auth/auth.component.ts
-import { Component, OnInit } from '@angular/core'
+import { Component } from '@angular/core'
import { FormBuilder } from '@angular/forms'
import { SupabaseService } from '../supabase.service'
@@ -144,7 +144,7 @@ import { SupabaseService } from '../supabase.service'
templateUrl: './auth.component.html',
styleUrls: ['./auth.component.css'],
})
-export class AuthComponent implements OnInit {
+export class AuthComponent {
loading = false
signInForm = this.formBuilder.group({
@@ -156,8 +156,6 @@ export class AuthComponent implements OnInit {
private readonly formBuilder: FormBuilder
) {}
- ngOnInit(): void {}
-
async onSubmit(): Promise<void> {
try {
this.loading = true
@@ -175,6 +173,7 @@ export class AuthComponent implements OnInit {
}
}
}
+
```
```html title=src/app/auth/auth.component.html