title: WARNING in Circular dependency detected - Angular Cli
body: <p><a href="https://github.com/angular/angular-cli/pull/6813" rel="noreferrer">https://github.com/angular/angular-cli/pull/6813</a> Added warnings for circular dependencies, and I know I can turn off all warnings using <em>"showCircularDependencies": false</em>. But I would rather keep the circular dependency warnings on. <strong>Is there a pattern that will let me fix the use case below, or is there a way to specifically disable the circular dependency plugin on a particular file?</strong></p>
  
  <p>The simplest scenario is if I have 3 files:</p>
  
  <p><strong>forms.model.ts</strong></p>
  
  <pre><code>import { CustomModel } from './custom.model';
  import { CustomForm } from './custom.form';
  
  export class Forms {
    items: CustomForm[] = [];
    public constructor(models?: CustomModel[]) {
      models.forEach(model =&gt; this.items.push(new CustomForm(model)));
    }
  }
  </code></pre>
  
  <p><strong>custom.model.ts</strong>   </p>
  
  <pre><code>export class CustomModel {
    nestedModels: CustomModel[];    
  }
  </code></pre>
  
  <p><strong>custom.form.ts</strong></p>
  
  <pre><code>import { Forms } from './forms.model';
  import { CustomModel } from './custom.model';
  
  export class CustomForm {
    nestedForms: Forms;
  
    constructor(model: CustomModel) {
      this.nestedForms = new Forms(model.nestedModels);
    }
  }
  </code></pre>
  
  <p>This causes the following warnings:</p>
  
  <pre><code>WARNING in Circular dependency detected:
  src\app\models\custom.form.ts -&gt; src\app\models\forms.model.ts -&gt; src\app\models\custom.form.ts
  
  WARNING in Circular dependency detected:
  src\app\models\forms.model.ts -&gt; src\app\models\custom.form.ts -&gt; src\app\models\forms.model.ts
  </code></pre>
  
  <p>In my actual app there are about 20-30 warnings because of this same pattern. 
  I think the underlying plugin <a href="https://github.com/aackerman/circular-dependency-plugin" rel="noreferrer">https://github.com/aackerman/circular-dependency-plugin</a> supports exclude patterns, but i'm not sure if theres a way to use this via the angular-cli.</p>