import { Injectable } from '@angular/core'; import {MatDialog} from "@angular/material/dialog"; import {LoginComponent, LoginInfoTypes} from "./auth/login/login.component"; import {Observable} from "rxjs"; @Injectable({ providedIn: 'root' }) export class LoginDialogServiceService { constructor( private dialog: MatDialog ) { } openLoginDialog(additionalInfo : LoginInfoTypes[] = []) : Observable{ const dialogRef = this.dialog.open(LoginComponent, { data: additionalInfo }); return dialogRef.afterClosed(); } }