title: Export / import sub folder from Angular Library
body: <p>I am working with an Angular library that uses public-api.ts to export the elements of the application so other consuming applications can use them. For example:</p>
  
  <p>public-api.ts:</p>
  
  <pre><code>export * from './lib/core.module';
  export * from './lib/components/header/header.component';
  export * from './lib/components/layout/layout.component';
  export * from './lib/components/tenant-nav/tenant-nav.component';
  export * from './lib/components/left-menu/left-menu.component';
  export * from './lib/services/config-resolver.service';
  export * from './lib/common/types';
  export * from './lib/common/const';
  </code></pre>
  
  <p>I have a folder lib/common/const that contains files that export constants. This is one file for example:</p>
  
  <pre><code>export const LEFT_MENU_EVENT = 'Base.Menu.LeftMenuEvent';
  export const APP_MENU_EVENT = 'Base.Menu.AppMenuEvent';
  </code></pre>
  
  <p>In my library I can import the variables from one specific file using </p>
  
  <pre><code>import * as CONSTANTS from './constants/myfile'
  </code></pre>
  
  <p>I wish to only import the constants file from my library in my consuming app. Here is the statement I wish to work:</p>
  
  <pre><code>import * as CONSTANTS from '@mylibrary/const'
  </code></pre>
  
  <p>How can this be done? It seems like everything that is exported in the public-api.ts file is flattened. I wish to reference a subfolder in my library similiar to </p>
  
  <pre><code>import { Component } from '@angular/core'
  </code></pre>