【问题标题】:how to make ngModel works in angulardart?如何使 ngModel 在 angulardart 中工作?
【发布时间】:2019-07-09 15:55:39
【问题描述】:

我是 angulardart 的新手。 模板编译器无法识别 ngModel。

请帮忙!!

我按照 angulardart 网站上的说明进行操作。 我试图更新 pubspec.yaml 但我不明白这一点: {toh-0 → toh-1}/pubspec.yaml

@@ -8,2 +8,3 @@ 8 8 依赖项: 9 9 角度:^5.3.0 10 + angular_forms: ^2.1.2

这里是说明链接: https://angulardart.dev/tutorial/toh-pt1

【问题讨论】:

  • formDirectives 是否已添加到您的指令列表中?如果是这样,如果您在问题中添加了更多代码,这将有所帮助。这没有足够的上下文来提供帮助。

标签: angular-dart


【解决方案1】:

请根据

更新您的 pubspec.yaml

还在组件的 dart 文件中添加/更新以下内容。

import 'package:angular_forms/angular_forms.dart';

@Component( selector: ..., directives: [formDirectives], )

【讨论】:

    猜你喜欢
    • 2019-10-30
    • 1970-01-01
    • 2019-08-26
    • 2014-01-09
    • 1970-01-01
    • 2018-01-26
    • 2020-01-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多