title: Displaying username in header Angular6
body: <p>I've been looking for this answer everywhere. I've got a header component and I'd like to display the name of the currently logged in user.
  in header.component.html:</p>
  
  <pre><code>&lt;a href="javascript:void(0)" class="nav-link" ngbDropdownToggle&gt;
                  &lt;i class="fa fa-user"&gt;&lt;/i&gt;USERNAME HERE&lt;b class="caret"&gt;&lt;/b&gt;
              &lt;/a&gt;
  </code></pre>
  
  <p>and in header.component.ts I have this method outside of constructor and ngOnInit</p>
  
  <pre><code>displayName(){
      return localStorage.getItem("username");
  }
  </code></pre>
  
  <p>is there a way to show that username on the header where I want it to?</p>