mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
* Changes * Draft * Restructure example to correct location * Update apps/docs/content/guides/getting-started/tutorials/with-angular.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update examples/user-management/angular-user-management/angular.json Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Revert CSS * Prettier * Update dependencies * Update examples/user-management/angular-user-management/src/styles.css Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
24 lines
631 B
TypeScript
24 lines
631 B
TypeScript
import { Component, OnInit } from '@angular/core'
|
|
import { User } from '@supabase/supabase-js'
|
|
import { SupabaseService } from './supabase.service'
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css'],
|
|
standalone: false,
|
|
})
|
|
export class AppComponent implements OnInit {
|
|
constructor(private readonly supabase: SupabaseService) {}
|
|
|
|
title = 'angular-user-management'
|
|
user: User | null = null
|
|
|
|
async ngOnInit() {
|
|
this.user = await this.supabase.getUser()
|
|
this.supabase.authChanges(async () => {
|
|
this.user = await this.supabase.getUser()
|
|
})
|
|
}
|
|
}
|