import { Component , OnInit , ViewEncapsulation } from '@angular/core' ; import { MatDialogRef } from '@angular/material/dialog' ; import { Store } from '@ngrx/store' ; import { AuthState } from '@nx-mean-starter/state/auth' ; @ Component ( { selector : 'app-auth-modal-page' , templateUrl : './auth-modal-page.component.html' , styleUrls : [ './auth-modal-page.component.scss' ] , encapsulation : ViewEncapsulation . None , } ) export class AuthModalPageComponent implements OnInit { constructor ( private store , private dialogRef ) { } ngOnInit ( ) { setTimeout ( ( ) => this . store . dispatch ( AuthState . signOutAuthModal ( ) ) ) ; } onSuccess ( ) { this . dialogRef . close ( true ) ; } }