title: What is a factory in Angular
body: <p>I was reading an <a href="https://blog.angularindepth.com/the-mechanics-of-dom-updates-in-angular-3b2970d5c03d" rel="noreferrer">article</a> of Max NgWizard K, about how Angular updates the DOM. I came across the following:</p>
  
  <blockquote>
    <p>For each component that is used in the application Angular compiler generates a factory. When Angular creates a component from a factory Angular uses this factory to instantiate View Definition which in turn is used to create component View. Under the hood Angular represents an application as a tree of views.</p>
  </blockquote>
  
  <p>In <a href="https://blog.angularindepth.com/here-is-what-you-need-to-know-about-dynamic-components-in-angular-ac1e96167f9e" rel="noreferrer">another article</a> from Max NgWizard K I found the definition of a factory:</p>
  
  <blockquote>
    <p>Factories describe the structure of a component view and are used when instantiating the component.</p>
  </blockquote>
  
  <p>I'm not really sure what is meant with this.</p>
  
  <h2>Questions:</h2>
  
  <ol>
  <li>What exactly are factories in Angular(2+)? </li>
  <li>Are there scenarios that a developer benefits form knowing how they work?</li>
  </ol>