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

By : Vadim
Source: Stackoverflow.com
Question!

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
By : Vadim


Answers

It was easier than i thought.

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


the problem is caused because you have not given the super user permission to the system. in order to make any changes into the system you should go to super user mode, for that you have to type the code as

sudo pip install virtualenv

it will help you out



This video can help you solving your question :)
By: admin