title: Angular 5 "ng build" shows no errors "ng build --prod" has many errors
body: <p>I know this has been asked before but nothing I read is helping.</p>
  <p>after <code>ng build</code> there are no errors</p>
  <p>after 'ng build --prod'</p>
  <pre><code>ERROR in src/app/catalog/product/product.component.html(19,43): : Property 'length' does not exist on type 'object'.
  src/app/catalog/product/product.component.html(36,39): : Property 'specs' does not exist on type 'Object'.
  src/app/catalog/product/product.component.html(58,8): : Property 'config' does not exist on type 'ProductComponent'. Did you mean 'Configs'?
  src/app/catalog/product/product.component.html(59,14): : Property 'config' does not exist on type 'ProductComponent'. Did you mean 'Configs'?
  src/app/catalog/product/add/add.component.html(14,8): : Property 'pre_configs' does not exist on type 'object'.
  src/app/catalog/product/add/add.component.html(30,28): : Property 'sets' does not exist on type 'object'.
  src/app/catalog/product/add/add.component.html(70,32): : Property 'price' does not exist on type 'object'.
  src/app/catalog/product/add/add.component.html(70,32): : Property 'price' does not exist on type 'object'.
  src/app/navigation/mini/mini-search/mini-search.component.html(9,5): : Property 'searchText' does not exist on type 'MiniSearchComponent'.
  src/app/navigation/mini/mini-search/mini-search.component.html(13,5): : Property 'searchText' does not exist on type 'MiniSearchComponent'.
  src/app/catalog/single/single.component.html(5,24): : Property 'id' does not exist on type 'any[]'.
  src/app/catalog/single/single.component.html(74,25): : Property 'id' does not exist on type 'any[]'.
  src/app/navigation/maga/maga.component.html(5,8): : Property 'name' does not exist on type 'any[]'.
  </code></pre>
  <p>This is an extremely annoying problem. I started to look at the errors one by one and will continue to but the errors just done make sense and that route will take me several hours. Can anyone advise me on where to start or why there are new errors after <code>--prod</code>?</p>
  <h1>Update: example of one of the errors</h1>
  <p><strong>in my components html</strong></p>
  <pre><code>&lt;div *ngIf=&quot;sample?.specs&quot;&gt;
      &lt;div class=&quot;spec-section&quot; *ngFor=&quot;let section of sample.specs&quot;&gt;
          &lt;h2&gt;{{section.name}}&lt;/h2&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>error after <code>ng build --prod</code></p>
  <pre><code>ERROR in ../product/product.component.html(37,12): : Property 'specs' does not exist on type 'Object'.
  </code></pre>
  <p>The following is the component code for getting <code>sample</code></p>
  <pre><code>constructor(public configsService: ConfigsService) {
      this.sample = configsService.sample_data;
  }
  </code></pre>
  <p>after <code>ng serve</code> or deploying <code>ng build</code> the fronend looks/ works fine. The error just pops up durring <code>ng build --prod</code></p>