title: Why does my navbar component not work in Angular?
body: <p>I am very new to Angular. In my Angular app I have a navbar folder in src/app/components/navbar and my navbar.component.ts file looks like this:</p>
  
  <p><strong>navbar.component.ts</strong></p>
  
  <pre><code>@Component({
    selector: 'app-navbar',
    templateUrl: './navbar.component.html',
    styleUrls: ['./navbar.component.scss']
  })
  export class NavbarComponent implements OnInit {
  
    constructor() { }
  
    ngOnInit() {
    }
  </code></pre>
  
  <p><strong>navbar.component.html</strong></p>
  
  <pre><code>&lt;p&gt;nav bar is working&lt;/p&gt;
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;app-navbar&gt;&lt;/app-navbar&gt;
  </code></pre>
  
  <p>but when I run localhost server it is not displaying <code>nav bar is working</code> in my index.html. how can I fix this?</p>