Dart I';我在构建反应式表单时遇到运行时错误

Dart I';我在构建反应式表单时遇到运行时错误,dart,angular-reactive-forms,angular-dart,Dart,Angular Reactive Forms,Angular Dart,尝试使用dartdevc在Dart中构建反应性角度形状时发生此运行时错误: Type 'List<Type>' is not a subtype of expected type 'num'. 如果在控件配置中删除,错误将更改为: Type 'List<Type>' is not a subtype of expected type 'String'. 如有任何建议,将不胜感激 'fee': Control<num>([null, PositiveNum

尝试使用dartdevc在Dart中构建反应性角度形状时发生此运行时错误:

Type 'List<Type>' is not a subtype of expected type 'num'. 
如果在控件配置中删除
,错误将更改为:

Type 'List<Type>' is not a subtype of expected type 'String'.
如有任何建议,将不胜感激

'fee': Control<num>([null, PositiveNumValidator]),
另见


Typo-应该是ngOnInit(){form=buildForm()}非常感谢。我忽略了配置需要验证器fn,而不是验证器。
class MyForm implements OnInit
{
  ControlGroup form;
  ...

  ControlGroup buildForm()
  {...}

  @override
  ngOnInit()
  form = buildForm();
}
'fee': Control<num>([null, PositiveNumValidator]),
'fee': Control<num>([null, PositiveNumValidator().validate]),
'fee': [null, PositiveNumValidator().validate],