ngOnInit() { // ... this.elRef.nativeElement.style.setProperty('--album-max-height', this.elRef.nativeElement.clientHeight + "px"); }