瀏覽代碼

modal

master
Florian Eisenmenger 2 年之前
父節點
當前提交
64821a1447
共有 2 個檔案被更改,包括 17 行新增3 行删除
  1. +12
    -2
      matsen-tool/src/app/contacts/new-contact/new-contact.component.ts
  2. +5
    -1
      matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts

+ 12
- 2
matsen-tool/src/app/contacts/new-contact/new-contact.component.ts 查看文件

@@ -1,4 +1,4 @@
import {Component} from '@angular/core';
import {Component, Input, OnInit} from '@angular/core';
import {FormGroup} from "@angular/forms";
import {contactForm} from "@app/_forms/apiForms";
import {ContactJsonld, ContactService} from "@app/core/api/v1";
@@ -9,7 +9,9 @@ import {Subscription} from "rxjs";
templateUrl: './new-contact.component.html',
styleUrl: './new-contact.component.scss'
})
export class NewContactComponent {
export class NewContactComponent implements OnInit {
@Input() contactId: number | undefined;

protected contactForm: FormGroup;
protected selectedImage: File | null;
protected contactSub: Subscription;
@@ -23,6 +25,14 @@ export class NewContactComponent {
this.contactSub = new Subscription();
}

ngOnInit() {
console.log(this.contactId);
}

getData(meineId: any) {
console.log(meineId);
}

onSubmit() {
if (this.contactForm.valid) {
// Hier können Sie die Daten senden oder weitere Aktionen durchführen


+ 5
- 1
matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts 查看文件

@@ -95,7 +95,11 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {

openModalNewContact() {
const modalRef = this.modalService.open(ModalComponent);
modalRef.componentInstance.dynamicComponent = NewContactComponent;
const newContactComponentInstance = new NewContactComponent(this.contactService);
newContactComponentInstance.contactId = 3;
// const newContactComponentInstance = modalRef.componentInstance.dynamicComponent = new NewContactComponent(this.contactService);
//newContactComponentVar.getData(3);
modalRef.componentInstance.dynamicComponent = newContactComponentInstance;
}

openModalNewPosting() {


Loading…
取消
儲存