title: Why is document null?
body: <p>**UPDATED ** with a solution that comes close to working:</p>
  
  <p>I'm trying to get my 'skip to content' link to jump to the first focusable element after '#content-start'.</p>
  
  <p>login-base.component.ts:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Inject, Injectable } from '@angular/core';
  import { DOCUMENT } from '@angular/platform-browser';
  
  @Component({
      selector: 'app-login',
      templateUrl: './login.component.html',
      styleUrls: ['./login.component.scss']
  })
  
  export class BaseLoginComponent implements OnInit {
  
      constructor(
          @Inject(DOCUMENT) private document: any
          ) {
      }
  
  
      skip() {
          console.log(document);
          console.log(document.querySelector);
          var content = document.querySelector(`#content-start`); // ?? document is null!!
          if (content) {
              var control = content.querySelector('input, button, a');
              console.log(control);
              //if (control) {
              //    control.focus(); // first only
              //}
          }
      };
  
      ngOnInit() {
          this.document.getElementById('skipLink').onclick = this.skip;
          this.document.getElementById('skipLink').onkeypress = function (e) {
              if (e.keyCode == 13) {
                  this.skip();
              }
          }
  
      }
  }
  </code></pre>
  
  <p>login.component.html:</p>
  
  <pre><code>&lt;div class="login-page"&gt;
      &lt;section class="main container" id="content-start"&gt;
          &lt;input type="text"/&gt;
  </code></pre>
  
  <p>This actually works, inasmuch as <em>console.log(control)</em> returns</p>
  
  <pre><code>&lt;input _ngcontent-c4="" id="username" name="username"&gt;
  </code></pre>
  
  <p>which is actually the correct control.</p>
  
  <p>But I can't just set .focus() because what I have there is an HTML snippet, not an object with methods, such as .focus();</p>
  
  <p>Uh, is there an angular equivalent of jQuery's $(control)?</p>