title: How to check for spacebar key event via angular?
body: <p>I have an angular template that uses this syntax within:</p>
  
  <pre><code>(click)="dosomething()"
  </code></pre>
  
  <p>that works fine. I now need to have that same event fire on return or spacebar. I added this for return:</p>
  
  <pre><code>(keyup.return)="dosomething()"
  </code></pre>
  
  <p>that also works fine.</p>
  
  <p>Got to spacebar and I can't get that to work. I've tried both...</p>
  
  <pre><code>(keyup.space)="dosomething()"
  </code></pre>
  
  <p>...as well as...</p>
  
  <pre><code>(keyup.spacebar)="dosomething()"
  </code></pre>
  
  <p>...but neither is working. In both cases, pressing space just defaults to browser behavior and scrolls the page down a bit. </p>
  
  <p>The keyup even seems to be the documented solution (at least as far as I've been able to find) so am stumped as to what I might be missing here. </p>