How to deal with different form controls in Angular 2 (Final)

Updated: 2016–07–07: From RC3 to RC4, no code changes, only angular version changed.

From time to time, I receive questions from my colleagues on how to bind different types of form controls in Angular 2.

Prior to RC 2, binding certain controls, for example, Radio button is not straight forward. With the new forms module. Things get easier.

Here are the eight type of controls that we’ll cover in the article:-

  1. text
  2. number
  3. radio
  4. select (primitive type)
  5. select (object)
  6. multiple select
  7. checkbox (boolean)
  8. checkbox (toggle value)

Feel free to skip any of these the control types (as some of them are really simple).

Read the my full article in scotch, with live example provided as usual.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.