title: Unable to use child component in a parent component in Angular2
body: <p>I am trying to use the child component inside the main component, app.component using the selector inside the template of the main component. However it is not working. </p>
  
  <p>child.component.ts</p>
  
  <pre><code>import { Component} from '@angular/core';
  @Component({
  selector: 'child-component',
  templateUrl: `&lt;p&gt;Child Component&lt;/p&gt;`
  })
  export class ChildComponent  {  }
  </code></pre>
  
  <p>app.component.ts</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { ChildComponent} from './child.component';
  
  @Component({
  selector: 'my-app',
  template: `&lt;h1&gt;Hello Angular!&lt;/h1&gt;
  &lt;child-component&gt;    &lt;/child-component&gt;       `
  })
  
  export class AppComponent { }
  </code></pre>
  
  <p>I did the declaration in the modules as below for the ChildComponent</p>
  
  <p>app.module.ts</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { ChildComponent} from './child.component';
  import { AppComponent } from './app.component';
  
  @NgModule({
  imports: [BrowserModule],
  declarations: [AppComponent,ChildComponent],
  bootstrap: [AppComponent]
  })
  
  export class AppModule { }
  </code></pre>
  
  <p>The solution mentioned at <a href="https://stackoverflow.com/questions/39410417/how-to-import-component-into-another-root-component-in-angular-2">How to import component into another root component in Angular 2</a> does not works.</p>
  
  <p>Please help with a resolution. </p>