From c3fd3271a46844482c6cc0dce4810afffccf81f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20P=C3=A1pai?= Date: Sun, 29 Jan 2023 10:37:25 +0100 Subject: [PATCH] update AuthComponent onInit --- .../guides/getting-started/tutorials/with-angular.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 { try { this.loading = true @@ -175,6 +173,7 @@ export class AuthComponent implements OnInit { } } } + ``` ```html title=src/app/auth/auth.component.html