I'm trying to use ngControl for the first time in my app:
<md-input placeholder="Amount" value="0" ngControl="ammount" required></md-input>
Added the following in my component:
import { FORM_PROVIDERS,FORM_DIRECTIVES } from '@angular/common';
..
directives: [MD_INPUT_DIRECTIVES,
FORM_DIRECTIVES,
],
providers: [FORM_PROVIDERS],
and I get this error:
browser_adapter.ts:78 EXCEPTION: Error: Uncaught (in promise): Template parse errors:
No provider for ControlContainer ("
[ERROR ->]<md-input placeholder="Amount" value="0" ngControl="ammount" required></md-input>
What am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…