<aspect-button
    *ngIf="elementModel.type === 'button'"
    #elementComponent
    [elementModel]="elementModel | cast: ButtonElement"
    (buttonActionEvent)="applyButtonAction($event)">
</aspect-button>
<aspect-frame
    *ngIf="elementModel.type === 'frame'"
    #elementComponent
    [elementModel]="elementModel | cast: FrameElement">
</aspect-frame>
<aspect-image
    *ngIf="elementModel.type === 'image'"
    #elementComponent
    [elementModel]="elementModel | cast: ImageElement"
    (elementValueChanged)="unitStateService.changeElementCodeValue($event)">
</aspect-image>