import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, } from '@angular/core'; import { fadeInOutAnimation, } from './../../helpers/animations/index'; import { DisableScrollingService, } from './../../helpers/services/index'; @Component({ animations: [ fadeInOutAnimation(), ], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[@fadeInOutAnimation]': '', }, selector: 'modal-component', styleUrls: [ './modal.component.scss', ], templateUrl: 'modal.component.pug', }) export class ModalComponent implements OnInit, OnDestroy { @Input() public additionalClasses: string[]; constructor( private _disableScrollingService: DisableScrollingService, ) {} public ngOnInit() { this._disableScrollingService.disableScrolling(); } public ngOnDestroy() { this._disableScrollingService.enableScrolling(); } }