Farata / angular2typescript

Code samples from the book Angular 2 Development with TypeScript
MIT License
440 stars 269 forks source link

Input event is fired when value is changed #23

Open yanyu0517 opened 7 years ago

yanyu0517 commented 7 years ago

MDN input event say:

The DOM input event is fired synchronously when the value of an <input>, <select>, or <textarea> element is changed.

But in Chapter 5 P158, There is

"You may argue that you could implement the preceding example by handling the input event, which would be dispatched when the user finished entering the stock symbol and moved the focus out of the input field. This is true, but there are many scenarios where you’ll want an immediate response from the server, such as retrieving and filtering a data collection as the user types."