{{item.city}}
Customer details template must be named as cfComponentSidenavTemplate * if we want it to show in sidenav from CfCoreBusinessComponent.
*/ @ViewChild('cfComponentSidenavTemplate', { read: TemplateRef }) customerDetailsTemplate: TemplateRefMethod that creates customer list embedded view and adds it to container.
*Should be done like that, otherwise, it will be impossible to dynamically replace list view * in customer container for another one, i.e. customer details.
*/ ngAfterViewInit() { setTimeout(() => { let listViewRef = this.customersListTemplate.createEmbeddedView(null); this.customerViewContainer.insert(listViewRef); }, 0); } /** *Method to decide based on properties, where and how to show customers list or customer details.
*/ showCustomerDetails($event, cfComponentSidenav, switchToList?: boolean) { this.selectedCustomer = (!switchToList) ? $event.cfRow : this.selectedCustomer; if (this.properties) { let detailsTmplProps = this.properties.templates.customerDetailsTmpl; switch (detailsTmplProps.templateType) { case 'listInComponent': this.cfComponentTemplateService.showTemplateInContainer(this.customersListTemplate, this.customerViewContainer); break; case 'detailsInComponent': this.cfComponentTemplateService.showTemplateInContainer(this.customerDetailsTemplate, this.customerViewContainer); break; case 'dialog': this.cfComponentTemplateService.showInDialog({ template: this.customerDetailsTemplate, dialogOptions: detailsTmplProps }); break; case 'sidenav': this.cfComponentTemplateService.showTemplateInSidenav(cfComponentSidenav, detailsTmplProps); break; } } } }