Page MenuHomec4science

tln-height.directive.ts
No OneTemporary

File Metadata

Created
Wed, Jun 5, 13:50

tln-height.directive.ts

import { Directive, ElementRef, OnInit, Input } from '@angular/core';
import { TlnPageViewComponent } from './tln-page-view.component';
@Directive({
selector: '[setMaxHeightTo]'
})
export class TlnHeightDirective implements OnInit{
@Input('setMaxHeightTo') pageView: TlnPageViewComponent;
constructor(public el: ElementRef) { }
ngOnInit(){
if (this.pageView != undefined && this.pageView != null){
this.pageView.max_height = window.innerHeight - this.el.nativeElement.offsetHeight -15;
}
}
}

Event Timeline