15 lines
522 B
TypeScript
15 lines
522 B
TypeScript
|
|
import { Component, Input } from '@angular/core';
|
||
|
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
||
|
|
import { InputComponent } from '../input/input.component';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'field-legal-name',
|
||
|
|
template: `<app-input [label]="label" [control]="control" [name]="name" />`,
|
||
|
|
imports: [ReactiveFormsModule, InputComponent],
|
||
|
|
})
|
||
|
|
export class LegalNameComponent {
|
||
|
|
@Input({ required: true }) control = new FormControl<string>('');
|
||
|
|
@Input() name = 'name';
|
||
|
|
@Input() label = 'نام شرکت';
|
||
|
|
}
|