title: How to share functions between components in angular?
body: <p>I have 3 type of components to handle forms. They are:</p>
  
  <ul>
  <li><code>EntityFormEditComponent //To Edit</code></li>
  <li><code>EntityFormViewComponent // To Visualize</code></li>
  <li><code>EntityFormCreateComponent // To Create</code></li>
  </ul>
  
  <p>They have a common parent that is the <code>EntityFormComponent</code> that share the basic logic between themself.</p>
  
  <p>When i create a new entity, this entity extends from the base forms components, like this:</p>
  
  <ul>
  <li><code>UserFormEditComponent extends from EntityFormEditComponent</code></li>
  <li><code>UserFormViewComponent extends from EntityFormViewComponent</code> </li>
  <li><code>UserFormCreateComponent extends from EntityFormCreateComponent</code></li>
  </ul>
  
  <p>This way of organizing my project create a problem that is: </p>
  
  <blockquote>
    <p>How i can share the common methods between these 3 components ?</p>
  </blockquote>
  
  <p>I think that service would be a solution, but is not recomendable because they aren't used to handle component logic.</p>