Dart I';我在构建反应式表单时遇到运行时错误
尝试使用dartdevc在Dart中构建反应性角度形状时发生此运行时错误: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
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]),
另见
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],