我有简单的Angular-Dart组件,尝试ngModel在单选输入中将connect属性设置为,应用正确编译,但是浏览器控制台给我错误:
ngModel
No provider found for RadioControlRegistry: RadioControlValueAccessor -> RadioControlRegistry.
代码:
import 'package:angular/angular.dart'; import 'package:angular_forms/angular_forms.dart'; @Component( selector: 'order-question-test', template: ''' ''', directives: [ coreDirectives, formDirectives, ] ) class OrderQuestion { RadioButtonState foodChicken = RadioButtonState(true, "chicken"); RadioButtonState foodFish = RadioButtonState(false, "fish"); OrderQuestion (); }
pubspec.yaml
environment: sdk: '>=2.2.0 <3.0.0' dependencies: angular: ^5.2.0 angular_components: ^0.13.0 json_annotation: ^2.0.0 dev_dependencies: angular_test: ^2.2.0 build_runner: ^1.5.0 build_test: ^0.10.3 build_web_compilers: ^1.0.0 json_serializable: ^2.0.0 pedantic: ^1.0.0 test: ^1.5.1
怎么了?