title: Angular 6 TypeScript getElementById returning null when element does exist
body: <p>Does anyone know why <code>document.getElementById("startDateText")</code> will return null from the paragraph element below, yet if I move that id to the element above it return as I would expect it to?</p>
  
  <p>The Typescript code is fired from a button and is not javascript embedded in the HTML.</p>
  
  <pre><code>   &lt;p class="card-text text-secondary"&gt;Start Date and Time&lt;/p&gt;
     &lt;p *ngIf="!isDates" class="card-text text-secondary" id="startDateText"  &gt;{{ Detail$?.StartDateTime | date:"MM/dd/yyyy 'at' h:mma" }}&lt;/p&gt;
  </code></pre>
  
  <p>TypeScript:</p>
  
  <pre><code> const myElement: HTMLElement = document.getElementById("startDateText");
   myElement.innerHTML =this.eventDetail$.StartDateTime;
  </code></pre>