Home  >  Q&A  >  body text

angular.js - angular $watch input box space does not trigger events

In the watch input box in angularjs, when a space is entered in the input box, the event is not triggered. Is there any solution?
(angular1.x)

仅有的幸福仅有的幸福2709 days ago779

reply all(1)I'll reply

  • 扔个三星炸死你

    扔个三星炸死你2017-06-12 09:25:54

    You can set ng-trim="false" for the input so that the watch value will not call the trim method.

    reply
    0
  • Cancelreply