vadjs
vadjs

Reputation: 355

Angular 2: How to bind select field in model-driven forms?

I couldn't find example of binding model-driven one-way data bound form value to the select field. Can you help me to find it?

Below is example of my non-working code with my try(Jade syntax).

select([formControl]='registerForm.controls["type"]')
  option(value='value1') Value 1
  option(value='value2') Value 2

Upvotes: 0

Views: 1381

Answers (1)

vadjs
vadjs

Reputation: 355

It was easier than i thought.

select([formControl]='registerForm.controls["type"]')
  option([value]='"value1"') Value 1
  option([value]='"value2"') Value 2

Upvotes: 3

Related Questions