mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 15:49:09 +03:00
20 lines
499 B
TypeScript
20 lines
499 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { SupabaseService } from './supabase.service';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css'],
|
|
})
|
|
export class AppComponent implements OnInit {
|
|
title = 'angular-user-management';
|
|
|
|
session = this.supabase.session;
|
|
|
|
constructor(private readonly supabase: SupabaseService) {}
|
|
|
|
ngOnInit() {
|
|
this.supabase.authChanges((_, session) => (this.session = session));
|
|
}
|
|
}
|