title: Angular2 restrict white space within template-driven input field
body: <p>Preface: I am not trying to use reactive forms</p>
  
  <p>What is the proper way to restrict white space in Angular2? I see <a href="https://stackoverflow.com/questions/27322826/angular-restriction-to-not-allow-spaces-in-text-field">this</a> answer for AngularJS, but I am not sure if there is a better way to do this in Angular2. Say I have:</p>
  
  <pre><code>        &lt;input
            placeholder="alert tag (25 max)"
            maxlength="25"
            value="alert"
            type="text"
            #alertTagInput
            [(ngModel)]="alertTag" &gt;
  </code></pre>
  
  <p>The user can currently type in whitespace, how do I restrict that?</p>