내가 가진 입력 : 나는에 회사를 두 번 클릭 할 때 나는 "새로운"버튼을 클릭하거나, 경우 : 2 차례에 걸쳐 열립니다입력 참/거짓 진술에 [장애인] - 각도 2
<input class="form-control" type="text" [(ngModel)]="context.company.city.zipCode">
그리고 팝업 모달 그리드를 사용하여 해당 회사의 속성을 편집 할 수 있습니다.
내 입력은이 요소의 시작 부분에서 가져온 CompanyTemplatePopupComponent에 있습니다. 입력에 영향을 주려면 일부 경로를 지정해야하는 경우가 있습니다.
는 내가 원하는 내가 editCompany에 대한 열 때, 그런 식으로 this.modal.open 기능에 작성하는 것입니다 - 입력 비활성화되고 newCompany가 활성화 될 때, 입력 필드도 사용할 수 있습니다. isUpdate은 어떻게 든 도움이 될 수 있다면 이미 부울입니다.
openCompanyPopup(isUpdate, company) {
let companyToEdit = isUpdate ? company : this.companyTemplate;
this.modal.open(CompanyTemplatePopupComponent, overlayConfigFactory({
dialogClass: 'modal-dialog style-dialog',
company: companyToEdit,
isUpdate: isUpdate,
countries: this.countries,
}, BSModalContext))
.then((d: any) => d.result)
.then(result => {
if (isUpdate) {
this.companyService.editCompany(result)
.subscribe(company => {
this.companyService.get().subscribe(response => this.handleSuccess(response));
});
}
else {
this.companyService.newCompany(result)
.subscribe(company => {
this.companyService.get().subscribe(response => this.handleSuccess(response));
});
}
});
}