title: Angular how to keep formgroup data in component after hiding it with ngIf (destroying it)
body: <p>I have an Angular app where I have this problem at multiple places, for example:<br />
  There's a <strong>search component</strong>, and another <strong>filtering component</strong> for the search, I show / hide the filter component with an <code>ngIf</code>, and in it's <code>ngOnInit()</code> I create a formGroup for the filter values.</p>
  <p>The problem is that after I use the filter, and close this component (the ngIf changes to false), and then when I want to use it again, I change the value controlling the ngIf to true, and the filter component makes a new empty form.</p>
  <p>I want to keep the values there somehow, so that what I wrote there stays there.</p>