title: Angular2 filter pipe on input
body: <p>I want to add filter on the input field</p>
  
  <pre class="lang-html prettyprint-override"><code> &lt;input class="ibox1 rightalign" type="text"
          [(ngModel)]="_note.StudentPercent"
          ngControl="StudentPercent" pattern="[0-9]*"
           #StudentPercent="ngForm"&gt;
  </code></pre>
  
  <p>Something like this</p>
  
  <pre><code>{{_note.StudentPercent| percent:'.0-0'}}
  </code></pre>
  
  <p>I also tried the following, and it doesn't work for me</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input class="ibox1 rightalign" type="text"
         [(ngModel)]="_note.StudentPercent" 
         ngControl="StudentPercent | percent:'.0-0'" pattern="[0-9]*" 
         #StudentPercent="ngForm"&gt;
  
  &lt;input class="ibox1 rightalign" type="text"
         [(ngModel)]="_note.StudentPercent | percent:'.0-0'"
         ngControl="StudentPercent" pattern="[0-9]*"
         #StudentPercent="ngForm"&gt;
  </code></pre>
  
  <p>How can I do this?</p>