[Library | Trunk]: Fix html condition error on change detections
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60885 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
e9259ae1ed
commit
34ae3808d0
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
AfterViewInit,
|
||||
AfterViewInit, ChangeDetectorRef,
|
||||
Component,
|
||||
Directive,
|
||||
ElementRef,
|
||||
|
@ -56,6 +56,9 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
properties: EnvProperties = properties;
|
||||
@ViewChildren("content", { read: ElementRef }) types: QueryList<ElementRef>;
|
||||
|
||||
constructor(private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
@HostListener('window:resize', ['$event'])
|
||||
onResize(event) {
|
||||
this.checkLarge();
|
||||
|
@ -70,8 +73,9 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
if(typeof document !== "undefined") {
|
||||
this.keys.forEach(key => {
|
||||
let type = this.types.find(type => type.nativeElement.id === key);
|
||||
this.large.set(key, type && type.nativeElement.offsetHeight > overflow)
|
||||
this.large.set(key, type && type.nativeElement.offsetHeight > overflow);
|
||||
});
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue