title: Render Component On To another Component Angular 5
body: <p>I have a component that I created and its called options because it renders edit and delete button. Then I have a table component that is reusable. I inject the table component into a view on the site. Then I import the options component but I don't display it on that view because I want to pass it to the table component and render it to  tag. Is there away to pass the options component from main component to the table component with injecting it because not not tables with have the same options component. </p>
  
  <p>options.component.ts</p>
  
  <pre><code>@Component({
      selector: 'options',
      template: `
          &lt;div class="btn-group btn-group-toggle" data-toggle="buttons"&gt;
              &lt;label class="btn btn-secondary active"&gt;
                  &lt;input type="radio" name="options" id="option" autocomplete="off" checked&gt;Edit
              &lt;/label&gt;
              &lt;label class="btn btn-danger"&gt;
                  &lt;input type="radio" name="options" id="option" autocomplete="off" checked&gt;Delete
              &lt;/label&gt;
           &lt;/div&gt;`,
      styles: []
  })
  
  export class OptionsComponent implements OnInit {
       constructor() { }
  
       ngOnInit() { }
  }
  </code></pre>
  
  <p>main.component.ts</p>
  
  <pre><code>import { TableComponent } 'file location here';
  import { OptionsComponent } 'file location here'; // Component is injected here and I want to pass it to &lt;app-table&gt;&lt;/app-table&gt;
  @Component({
      selector: 'app-main',
      template:'&lt;app-table [tableData]="LocationsList"&gt;&lt;/app-table&gt;'
  })
  
  export MainComponent implements OnInit {
      LocationsList: []; // list of locations
  
  }
  </code></pre>
  
  <p>table.row.component.ts</p>
  
  <pre><code>@Component({
      selector: 'app-table',
      template: `
         &lt;ul&gt;
            &lt;li *ngFor="let property of tableData"&gt;{{ property }}&lt;/li&gt;
         &lt;/ul&gt;`,
  })
  
  export class TableComponent implements OnInit {
       @Input() tableData: any[];
  } 
  </code></pre>