3

I'm attempting to create a very simple select with values from an enum. This is the Stackblitz demo.

I've taken the code directly from another working stackblitz implementation so I'm not sure why the error:

Template parse errors: Can't bind to 'formControl' since it isn't a known property of 'select'. ("][formControl]="control"> {{filter}"):

Ole
  • 41,793
  • 59
  • 191
  • 359
  • Possible duplicate of [Can't bind to 'formControl' since it isn't a known property of 'input' - angular2 material Autocomplete issue](https://stackoverflow.com/questions/43220348/cant-bind-to-formcontrol-since-it-isnt-a-known-property-of-input-angular) – Vikas Sep 17 '18 at 15:41

2 Answers2

6

You need to import ReactiveFormsModule to your imports. Your app.module.ts doesn't contain all the correct imports: imports: [ BrowserModule, FormsModule ]

Peter Kim
  • 1,929
  • 14
  • 22
0

you may use formControlName="control"

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31399437) – Gowtham Raj J Mar 31 '22 at 18:29