title: Angular not importing a module in app.module.ts still gives error in component declarations of that module
body: <p>I have an app that I want to extract two builds of it.</p>
  <p>First is a build that contains the whole app.</p>
  <p>Second one is an app that contains only one of my modules. And it has a separate routing module as well.</p>
  <p>I separated the builds using file replacement to define a new way of build in <code>angular.json</code>.</p>
  <p>Replacements are these:</p>
  <pre><code>&quot;fileReplacements&quot;: [
    {
      &quot;replace&quot;: &quot;projects/my-app/src/environments/environment.ts&quot;,
      &quot;with&quot;: &quot;projects/my-app/src/environments/environment.prod.ts&quot;
    },
    {
      &quot;replace&quot;: &quot;projects/my-app/src/app/app.module.ts&quot;,
      &quot;with&quot;: &quot;projects/my-app/src/app/app-auth-standalone.module.ts&quot;
    },
    {
      &quot;replace&quot;: &quot;projects/my-app/src/app/app-routing.module.ts&quot;,
      &quot;with&quot;: &quot;projects/my-app/src/app/app-auth-standalone-routing.module.ts&quot;
    },
    {
      &quot;replace&quot;: &quot;projects/my-app/src/app/app.component.ts&quot;,
      &quot;with&quot;: &quot;projects/my-app/src/app/app-auth-standalone.component.ts&quot;
    }
  ]
  </code></pre>
  <p>Now when I run the <code>ng run my-app:auth-standalone:production</code> it gives me this kinds of errors:</p>
  <pre><code>Error: &lt;some-path&gt;/message-bot.component.html:24:34 - error NG8002: Can't bind to 'control' since it isn't a known property of 'app-bot-view-tr
  ansfer-to-user'.
  1. If 'app-bot-view-transfer-to-user' is an Angular component and it has 'control' input, then verify that it is part of this module.
  2. If 'app-bot-view-transfer-to-user' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
  </code></pre>
  <p>If I don't import any of the modules or parent modules in the <code>AppModule</code> it will throw this kind of errors.</p>
  <p>I tried adding <code>NO_ERRORS_SCHEMA</code> and <code>CUSTOM_ELEMENTS_SCHEMA</code> in all modules but the errors still occur.</p>