title: What’s the use of "selector" in Angular 4?
body: <p>I am new to Angular and following the <a href="https://angular.io/tutorial/toh-pt5" rel="nofollow noreferrer">Tour of Heroes tutorial</a> from the official website.</p>
  
  <p>I downloaded the part 5 tutorial, and saw the code</p>
  
  <pre><code>@Component({
    selector: 'my-heroes',
  </code></pre>
  
  <p>in one of the components. Reading up to the beginning of the tutorial and looking through the documentation, it says that the selector matches the element in your HTML, but when I check all the HTML files in the downloaded example, there's no element with a <code>&lt;my-heroes&gt;&lt;/my-heroes&gt;</code> tag. Still, it works perfectly fine with no error.</p>
  
  <p>What, then, is the purpose of <code>selector: 'my-heroes'</code>?</p>
  
  <p>I even tried changing its name to something like </p>
  
  <pre><code>selector: 'my-heroes223'
  </code></pre>
  
  <p>and it continued to work without any error or warning.</p>
  
  <p><strong>Note: This is not duplicate question of any post. My question is that "why does selector not have any effect if its mentioned otherwise in documentations"</strong></p>