title: How to get environment from Angular Component as "Library"?
body: <p>I'm creating Angular Library but have some problem about environment.
  I generated a application(parent) and library(child).
  How to get environment (it defined under parent) from child component that defined in library.</p>
  
  <p>I generated apps like this.</p>
  
  <pre class="lang-sh prettyprint-override"><code>ng version
  # Angular CLI: 8.0.1
  # Node: 10.15.3
  # OS: darwin x64
  # Angular: 8.0.0
  ng new app-parent
  cd app-parent
  ng generate library lib-child
  </code></pre>
  
  <p>project structure like this.</p>
  
  <pre><code>$ tree -L 2
  .
  ├── README.md
  ├── angular.json
  ├── browserslist
  ├── e2e
  │   ├── protractor.conf.js
  │   ├── src
  │   └── tsconfig.json
  ├── karma.conf.js
  ├── package.json
  ├── projects
  │   └── lib-child # &lt;- wanna get environment from here!!
  ├── src
  │   ├── app
  │   ├── assets
  │   ├── environments
  │   ├── favicon.ico
  │   ├── index.html
  │   ├── main.ts
  │   ├── polyfills.ts
  │   ├── styles.sass
  │   └── test.ts
  ├── tsconfig.app.json
  ├── tsconfig.json
  ├── tsconfig.spec.json
  ├── tslint.json
  └── yarn.lock
  </code></pre>
  
  <p>I tried import as relative path like... <code>import { environment } from '../../../src/environment';</code>
  But this solution can NOT use another app.
  Library should use some environment&amp;apps.
  I'm finding a way to like this.</p>
  
  <pre class="lang-js prettyprint-override"><code>import { environment } from '@angular/core';
  
  environment.production #=&gt; true/false
  </code></pre>