import { Component , Injector , ElementRef , ViewChild } from '@angular/core' ; import { Router } from '@angular/router' ; import { AppComponentBase } from '@shared/component-base' ; import { LoginService } from './login.service' ; import { accountModuleAnimation } from '@shared/animations/routerTransition' ; import { AbpSessionService } from '@abp' ; @ Component ( { templateUrl : './login.component.html' , styleUrls : [ './login.component.less' ] , animations : [ accountModuleAnimation ( ) ] } ) export class LoginComponent extends AppComponentBase { @ ViewChild ( 'cardBody' ) cardBody : ElementRef ; submitting : boolean = false ; constructor ( injector , public loginService , private _router , private _sessionService ) { super ( injector ) ; } ngAfterViewInit ( ) { } get multiTenancySideIsTeanant ( ) : boolean { return this . _sessionService . tenantId > 0 ; } get isSelfRegistrationAllowed ( ) : boolean { if ( ! this . _sessionService . tenantId ) { return false ; } return true ; } login ( ) { this . submitting = true ; this . loginService . authenticate ( ( ) => this . submitting = false ) ; } }