title: How do I identify the id of the "<app>" component or selector app-administration-treatment-plan-history
body: <p>In the patient-roster-search.component.html when I click on the link I called the method <code>onViewPatientTreatmentHistory(row)</code>.</p>
  
  <p>In the patient-roster-search-component.ts file how do I find the <code>AdministrationTreatmentPlanHistoryComponent</code> that is created from 
  <code>&lt;app-administration-treatment-plan-history&gt;&lt;/app-administration-treatment-plan-history&gt;</code>?
  Or how do I find the selector app-administration-treatment-plan-history in administration-treatment-plan-history.component.ts?</p>
  
  <hr>
  
  <p>patient-roster-component.html:</p>
  
  <pre><code>&lt;div style="display:block" id="patientRosterSearch"&gt;&lt;app-patient-roster-search&gt;&lt;/app-patient-roster-search&gt;&lt;/div&gt;
  
  &lt;div style="display:none" id="administrationTreatmentPlanHistory"&gt;&lt;app-administration-treatment-plan-history&gt;&lt;/app-administration-treatment-plan-history&gt;&lt;/div&gt;
  </code></pre>
  
  <p>patient-roster-search.component.html:</p>
  
  <pre><code>&lt;td class="tblRow actionRow small"&gt;
    &lt;button type="button" class="btn btn-link" id="{‌{rowData.mrn}}" (click)="onViewPatientTreatmentPlanHistory(rowData)"&gt;View&lt;/button&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>patient-roster-search-component.ts:</p>
  
  <pre><code>onViewPatientTreatmentPlanHistory(item) {
   this.patient = new  AdministrationTreatmentPlanHistoryComponent();
   this.patient.onViewPatientTreatmentPlanHistory(item);
   return this.patient;
  }
  </code></pre>
  
  <p>administration-treatment-plan-history.component.ts:</p>
  
  <pre><code>export class AdministrationTreatmentPlanHistoryComponent implements OnInit {
  
  @Component({
    selector: 'app-administration-treatment-plan-history',
    templateUrl: './administration-treatment-plan-history.component.html',
    styleUrls: ['./administration-treatment-plan-history.component.css']
  })
  
  ngOnInit() {
    this.planName = "John Plan";
  }
  
  onViewPatientTreatmentPlanHistory(item) {
    document.getElementById("administrationTreatmentPlanHistory").style.display="block";
    document.getElementById("patientRosterSearch").style.display="none";
    this.planName= item.firstName;
  }
  `````````````
  </code></pre>