title: How to add multiple components on same page?
body: <p>I just started an Angular app so I want to add multiple components on same page. How does this work in Angular? Let's assume each div will be a separate component as well as the view. The components must be in separate .ts files.</p>
  
  <p>Would the following work?</p>
  
  <p>app.component.html:</p>
  
  <pre><code>&lt;div&gt;APP Component1&lt;/div&gt;
  &lt;div&gt;App Component2&lt;/div&gt;
  </code></pre>
  
  <p>app.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
  })
  export class AppComponent1 {
      title = 'app works!';
  }
  
  export class AppComponent2 {
      title = 'app works!';
  }
  </code></pre>