27 lines
730 B
TypeScript
27 lines
730 B
TypeScript
import { AuthService } from './../auth.service';
|
|
import { Component, inject, computed, OnInit } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-navbar',
|
|
standalone: false,
|
|
templateUrl: './navbar.component.html',
|
|
styleUrl: './navbar.component.css'
|
|
})
|
|
export class NavbarComponent {
|
|
navItems: { label:string, path:string }[] = [
|
|
{label: 'Programm', path: '/schedule'},
|
|
{label: 'Preise', path: '/prices'},
|
|
{label: 'Bezahlen', path: '/checkout/order'},
|
|
{label: 'Film importieren', path: '/admin/movie-importer'},
|
|
{label: 'Statistiken', path: '/admin/statistics'},
|
|
]
|
|
|
|
private auth = inject(AuthService)
|
|
|
|
currentUser = computed(() => this.auth.user());
|
|
|
|
logout() {
|
|
this.auth.logout();
|
|
}
|
|
}
|