Angularjs Delayed update

Source: Internet
Author: User


Ng-model-options= "{updateon: ' Blur '}"

Options to apply to the current model. Valid keys are:

  • updateOn: string specifying which event should the input is bound to. You can set several events using a space delimited list. There is a special event called that default matches the default events belonging of the control.
  • debounce: integer value which contains the Debounce model update value in milliseconds. A value of 0 triggers an immediate update. If an object was supplied instead, you can specify a custom value for each event. For example:ng-model-options="{ updateOn: ‘default blur‘, debounce: { ‘default‘: 500, ‘blur‘: 0 } }"
  • allowInvalid: Boolean value which indicates that the model can is set with values that does not validate correctly instead of the Defau Lt behavior of setting the model to undefined.
  • gettersetter : Boolean value which determines whether or not to treat functions Bound to  ngmodel  as getters/setters.
  • timezone: Defines the timezone to being used to read/write the Date instance in the model for <input type="date"> , <input type="time"> , .... It understands Utc/gmt and the continental US time zone abbreviations, but to general use, use a time zone offset, for ex Ample, ‘+0430‘ (4 hours, minutes east of the Greenwich meridian) If not specified, the timezone of the browser would be us Ed.

<div ng-controller= "Examplecontroller" >  <form name= "UserForm" >    <label>Name:      <input type= "text" name= "userName"             ng-model= "user.name"             ng-model-options= "{ Updateon: ' Blur '} "             ng-keyup=" Cancel ($event) "/>    </label><br/>    <label > Otherdata:      <input type= "text" ng-model= "User.data"/>    </label><br/>  </form>  <pre>user.name = <span ng-bind= "User.Name" ></span></pre></div >

 

Angularjs Delayed update

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.