title: angular 13 ivy: use component html recursively ==> "The component 'x' is used in the template but importing it would create a cycle: "
body: <p>I understand this error but i need help finding a solution.</p>
  <p>Im making a CMS ui. It has a <code>form.component.html</code> which uses <code>fields.component.html</code> one of the <em>fields</em> is a <code>field-set.component.html</code> which re-imports <code>fields.component.html</code></p>
  <p>I want this recursive use of template to work some how.</p>
  <blockquote>
  <p>note =&gt; this set up works in dev. It just cant compile. Also im pretty sure this used to compile before Ivy</p>
  </blockquote>
  <h3>Markup structure (base)</h3>
  <pre><code>&lt;form&gt;
    &lt;fields&gt;&lt;/fields&gt;
  &lt;/form&gt;
  </code></pre>
  <h3>Markup structure (fields)</h3>
  <pre><code>&lt;div class=&quot;fields&quot;&gt;
  &lt;field-text&gt;&lt;/field-text&gt;
  &lt;field-textarea&gt;&lt;/field-textarea&gt;
  &lt;field-set&gt;&lt;/field-set&gt; &lt;!-- this has fields again --&gt;
  &lt;field-select&gt;&lt;/field-select&gt;
  &lt;field-date&gt;&lt;/field-date&gt;
  &lt;/div&gt;
  </code></pre>
  <h3>Markup structure (field-set)</h3>
  <pre><code>&lt;div class=&quot;field-set&quot;&gt;
  &lt;fields [fieldSet]=&quot;true&quot;&gt;&lt;/fields&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/kULIs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kULIs.png" alt="enter image description here" /></a></p>
  <pre><code>Angular CLI: 13.1.3
  Node: 14.16.0
  Package Manager: npm 6.14.11
  OS: darwin x64
  
  Angular: 13.1.2
  ... animations, common, compiler, compiler-cli, core, forms
  ... language-service, material, platform-browser
  ... platform-browser-dynamic, router
  
  Package                         Version
  ---------------------------------------------------------
  @angular-devkit/architect       0.1301.3
  @angular-devkit/build-angular   13.1.3
  @angular-devkit/core            13.1.3
  @angular-devkit/schematics      13.1.3
  @angular/cli                    13.1.3
  @angular/fire                   7.2.0
  @schematics/angular             13.1.3
  ng-packagr                      13.1.3
  rxjs                            6.6.7
  typescript                      4.5.4
  </code></pre>