Angular2 material design - reactive forms - md-select is not populated by default

I am having a problem with the md-select component of Angular2 material, where the value from the FormGroup is not loading or filling in the select. Here is the code ...

https://embed.plnkr.co/p7Fm9lC4TxoVaZ8ydYf0/

The value for the formal control is set to 1, but the user interface shows as if no value is being populated with a placeholder message.

Am I doing something wrong?

+4
source share
1 answer

, , , , . , , , : md-select

, ? , Angular. , , , ...

, :

this.form = new FormBuilder().group({
  formal: [1]
  });

:

this.form = new FormBuilder().group({
  formal: ['1']
  });
+4

Source: https://habr.com/ru/post/1666636/


All Articles