Angular Dart教程-无法找到某些来源的模块

时间:2018-09-13 06:54:21

标签: angular-dart

我正在尝试遵循Angular Dart教程(https://webdev.dartlang.org/angular/tutorial/toh-pt1),但在添加了一些使用ngModel指令的html后陷入困境。

根据本教程,为了使用ngModel指令,必须在pubspec.yaml中添加“ angular_forms:^ 2.0.0”,导入“ package:angular_forms / angular_forms.dart”并在其中添加“ formDirectives”组件指令。我做了所有这些工作,包括运行“ pub get”来获取依赖关系,但是当我运行“ webdev serve”时,出现以下错误:

[SEVERE] build_web_compilers|entrypoint on test/app_test.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

我想念什么?

1 个答案:

答案 0 :(得分:0)

我有同样的问题。我不认为它在Tute中有明确提及,但是在将Angular_forms依赖项添加到pubspec.yaml文件后,您需要使用以下新的依赖项来拉入

pub get

希望有帮助!