Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在这里我们可以读到我们需要FORM_DIRECTIVES使用,ngForm或者ngSubmit但对我来说,没有FORM_DIRECTIVES包含它的工作方式相同。
FORM_DIRECTIVES
ngForm
ngSubmit
有人能告诉我为什么吗?
在 Angular2 决赛中
@NgModule({ // only one of these is requured if only one is used imports: [FormsModule, ReactiveFormsModule], ... })
是必须的。FORM_DIRECTIVES不存在了。