diff --git a/components/sb-item-body.ts b/components/sb-item-body.ts index 396e6a8..856cd38 100644 --- a/components/sb-item-body.ts +++ b/components/sb-item-body.ts @@ -11,7 +11,7 @@ import {Component, ElementRef, Renderer, ViewChild} from '@angular/core'; }) export class SBItemBody { - @ViewChild('body') bodyEl: ElementRef; + @ViewChild('body', {static: false}) bodyEl: ElementRef; constructor(private renderer: Renderer) {} diff --git a/components/sb-item.ts b/components/sb-item.ts index dce52b6..89359b1 100644 --- a/components/sb-item.ts +++ b/components/sb-item.ts @@ -18,7 +18,7 @@ export class SBItem { @Input() public collapsed: boolean = true; @Output() onToggled = new EventEmitter(); - @ContentChild(SBItemBody) body: SBItemBody; + @ContentChild(SBItemBody, {static: false}) body: SBItemBody; constructor(@Inject(forwardRef(() => SqueezeBox)) squeezebox: SqueezeBox) { this.squeezebox = squeezebox;