title: In angularjs ng-change="chk(query)" call function when space is hit after typing word
body: <p>I am using following code to take input from user and search the term</p>
  
  <p>the problem is that if I press any word function gets called but  when I press spacebar it is not calling the function so I want if user enters space then also the function should get called</p>
  
  <pre><code>&lt;input ng-model="query" ng-change="chk(query)"  placeholder="Search.."&gt;
  </code></pre>
  
  <p>so please can anyone suggest me with the solution please</p>
  
  <p>Thank you</p>
  
  <p>I tried to use <code>ng-trim="false"</code> but not working</p>