You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
801 B
24 lines
801 B
import { Component, OnInit, Input } from '@angular/core'; |
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
@Component({ |
|
selector: 'app-editcamera', |
|
templateUrl: './editcamera.component.html', |
|
styleUrls: ['./editcamera.component.scss'] |
|
}) |
|
export class EditcameraComponent implements OnInit { |
|
@Input() data: any |
|
validateForm!: FormGroup; |
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } |
|
|
|
ngOnInit(): void { |
|
let datacopy = JSON.parse(JSON.stringify(this.data)) |
|
this.validateForm = this.fb.group({ |
|
name: [datacopy.name, [Validators.required]], |
|
code: [datacopy.code, [Validators.required]] |
|
}); |
|
} |
|
|
|
}
|
|
|