title: What's the use of public-api.ts in Angular Material/ Angular Flex Layout?
body: <p>I learned from angular-material and angular-flex-layout that when they export a component, they first export the relevant sub-components in public-api.ts and then just export everything from the public-api.ts in the index.ts (e.g. export * from './public-api'). Here is the example of its badge component:</p>
  
  <p>// public-api.ts
  <code>
  export * from './badge-module';
  export * from './badge';
  </code></p>
  
  <p>// index.ts
  <code>
  export * from './public-api';
  </code></p>
  
  <p>My question is why don't just put all the export things to index.ts but border to create one more public-api.ts?</p>