title: NullInjectorError: No provider for FaConfig
body: <p>Installed <em>angular-fontawesome</em> into angular app using npm like mentioned <a href="https://github.com/FortAwesome/angular-fontawesome#installation" rel="noreferrer">in github</a></p>
  
  <p>Works fine in development mode. But gave error in production build.</p>
  
  <p>Of course the initial error was</p>
  
  <pre><code>NullInjectorError: StaticInjectorError(Do)[qm -&gt; t]: StaticInjectorError(Platform: core)[qm -&gt; t]: NullInjectorError: No provider for t!
  </code></pre>
  
  <p>Had to change setting in <em>angular.json</em> to</p>
  
  <pre><code>"optimization": false,
  ...
  "buildOptimizer": true,
  </code></pre>
  
  <p>to find out the actual error</p>
  
  <pre><code>NullInjectorError: StaticInjectorError(AppModule)[FaIconComponent -&gt; FaConfig]: StaticInjectorError(Platform: core)[FaIconComponent -&gt; FaConfig]: NullInjectorError: No provider for FaConfig!
  </code></pre>
  
  <p>How shall I resolve this.</p>
  
  <p>The module has</p>
  
  <pre><code>import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
  </code></pre>
  
  <p>Added to imports</p>
  
  <pre><code>  @NgModule({
    declarations: [...],
    imports: [
      ...
      FontAwesomeModule
    ],
  </code></pre>
  
  <p>And component has</p>
  
  <pre><code>import { faEllipsisV, ... } from '@fortawesome/free-solid-svg-icons';
  </code></pre>
  
  <p>like mentioned in how to guide.</p>
  
  <p>Here are dependencies</p>
  
  <pre><code>  "dependencies": {
      "@angular/animations": "~8.2.11",
      "@angular/cdk": "~8.2.3",
      "@angular/common": "~8.2.11",
      "@angular/compiler": "~8.2.11",
      "@angular/core": "~8.2.11",
      "@angular/forms": "~8.2.11",
      "@angular/material": "^8.2.3",
      "@angular/platform-browser": "~8.2.11",
      "@angular/platform-browser-dynamic": "~8.2.11",
      "@angular/router": "~8.2.11",
      "@fortawesome/angular-fontawesome": "^0.6.0-alpha.0",
      "@fortawesome/fontawesome-svg-core": "^1.2.25",
      "@fortawesome/free-solid-svg-icons": "^5.11.2",
      "bootstrap": "^4.3.1",
      "classlist.js": "^1.1.20150312",
      "hammerjs": "^2.0.8",
      "ngx-bootstrap": "^5.2.0",
      "ngx-cookie-service": "^2.2.0",
      "ngx-webstorage-service": "^4.1.0",
      "rxjs": "~6.4.0",
      "tslib": "^1.10.0",
      "web-animations-js": "^2.3.2",
      "zone.js": "~0.9.1"
    }
  </code></pre>
  
  <p>Angular Version <code>8.3.12.</code></p>