Browse Source

feat(client): implement output signals

pull/6913/head
KenTandrian 6 days ago
parent
commit
e71a08bdd1
  1. 11
      apps/client/src/app/components/header/header.component.ts

11
apps/client/src/app/components/header/header.component.ts

@ -27,12 +27,11 @@ import {
Component, Component,
CUSTOM_ELEMENTS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA,
DestroyRef, DestroyRef,
EventEmitter,
HostListener, HostListener,
inject, inject,
Input, Input,
OnChanges, OnChanges,
Output, output,
viewChild viewChild
} from '@angular/core'; } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@ -85,11 +84,11 @@ export class GfHeaderComponent implements OnChanges {
@Input() public pageTitle: string; @Input() public pageTitle: string;
@Input() public user: User; @Input() public user: User;
@Output() public readonly signOut = new EventEmitter<void>(); public readonly signOut = output<void>();
protected assistantElement = protected readonly assistantElement =
viewChild.required<GfAssistantComponent>('assistant'); viewChild.required<GfAssistantComponent>('assistant');
protected assistentMenuTriggerElement = protected readonly assistentMenuTriggerElement =
viewChild.required<MatMenuTrigger>('assistantTrigger'); viewChild.required<MatMenuTrigger>('assistantTrigger');
protected hasFilters: boolean; protected hasFilters: boolean;
@ -288,7 +287,7 @@ export class GfHeaderComponent implements OnChanges {
} }
protected onSignOut() { protected onSignOut() {
this.signOut.next(); this.signOut.emit();
} }
protected openLoginDialog() { protected openLoginDialog() {

Loading…
Cancel
Save