title: Input value clears when it component is hidden, but i dont want to do it. How can i fix it?
body: <p>When i toggle visibility of my input child component his value clears and this is happen with all form components that i adding. How can i fix it?</p>
  <p><strong>My input child component.html</strong></p>
  <pre><code>&lt;mat-form-field&gt;
    &lt;mat-label&gt;{{ title }}&lt;/mat-label&gt;
    &lt;input 
      [formControl]=&quot;control&quot;
      [readonly]=&quot;!isVisible&quot;
      [type]=&quot;type&quot;/&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  <p><strong>input.ts</strong></p>
  <pre><code>export class InputComponent implements OnInit {
    @Input() title: string;
    @Input() isVisible: boolean;
    @Input() control: FormControl;
    @Input() type: 'text' | 'number';
  }
  </code></pre>
  <p><strong>Parent form component</strong></p>
  <pre><code>&lt;div 
    [formGroup]=&quot;form&quot;&gt;
    &lt;app-input
      [control]=&quot;form.get('input')&quot;
      [isVisible]=&quot;isVisible&quot;
      type=&quot;text&quot;
      title=&quot;Example title&quot;&gt;
    &lt;/app-input&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>form component.ts</strong></p>
  <pre><code>export class IfaceFormComponent implements OnInit {
  
    @Input() isVisible: boolean;
  
    form: FormGroup = this.fb.group({
      input: this.fb.control('')
    });
  
    constructor(
      private fb: FormBuilder,
    ) { }
  
  }
  </code></pre>
  <p><strong>And my card component, where i import form component</strong></p>
  <pre><code>&lt;mat-card&gt;
     &lt;div&gt;
        &lt;button (click)=&quot;toggleVisibiltyMode()&quot;&gt;
          &lt;mat-icon&gt;mode_edit&lt;/mat-icon&gt;
        &lt;/button&gt;
    &lt;/div&gt;
    &lt;mat-card-content
      (click)=&quot;toggleViewMode()&quot;&gt;
      &lt;app-form *ngIf=&quot;!isCompactView&quot; [isVisible]=&quot;isVisible&quot;&gt;&lt;/app-form&gt;
    &lt;/mat-card-content&gt;
  &lt;/mat-card&gt;
  </code></pre>
  <p><strong>card component.ts</strong></p>
  <pre><code>export class WanCardComponent implements OnInit {
  
    @Input() index: number;
  
    isVisible = false;
    isCompactView = false;
  
    toggleViewMode(): void {
      if (!this.isVisible) {
        this.isCompactView = !this.isCompactView;
      }
    }
  
    toggleVisibilityMode(): void {
      this.isVisible = !this.isVisible;
      if (this.isCompactView) {
        this.isCompactView = !this.isCompactView;
      }
    }
  }
  </code></pre>