Skip to content

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

remove oninit for avatar

Attila Pápai624913ea0ec1
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 46a166043ec..d6d1cfec7f8 100644
--- a/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx
+++ b/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx
@@ -403,16 +403,16 @@ Let's create an avatar for the user so that they can upload a profile photo.
Create an **AvatarComponent** with `ng g c avatar` Angular CLI command.
```ts title=src/app/avatar/avatar.component.ts
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
-import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser'
+import { Component, EventEmitter, Input, Output } from '@angular/core'
+import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'
import { SupabaseService } from '../supabase.service'
@Component({
selector: 'app-avatar',
templateUrl: './avatar.component.html',
- styleUrls: ['./avatar.component.css'],
+ styleUrls: ['./avatar.component.scss'],
})
-export class AvatarComponent implements OnInit {
+export class AvatarComponent {
_avatarUrl: SafeResourceUrl | undefined
uploading = false
@@ -427,8 +427,6 @@ export class AvatarComponent implements OnInit {
constructor(private readonly supabase: SupabaseService, private readonly dom: DomSanitizer) {}
- ngOnInit(): void {}
-
async downloadImage(path: string) {
try {
const { data } = await this.supabase.downLoadImage(path)