简体   繁体   English

无法加载angular.dart

[英]Cannot load angular.dart

During the reproduction of this example, something strange happend: https://github.com/dart-lang/dart_by_example/tree/master/example/angular/basics/conditionally_switch_between_dom_elements 在这个例子的再现过程中,发生了一些奇怪的事情: https//github.com/dart-lang/dart_by_example/tree/master/example/angular/basics/conditionally_switch_between_dom_elements

So created a plain Dart project in WebStorm, added angular.dart, copied the example. 于是在WebStorm中创建了一个简单的Dart项目,添加了angular.dart,复制了这个例子。 Everything works well, if the files are "web" directory. 如果文件是“web”目录,一切都运行良好。

BUT, after I moved the three files into a switch subdirectory, I have the following problem: An error occurred loading file: package:angular/angular.dart 但是,在我将三个文件移动到switch子目录后,我遇到以下问题:加载文件时出错:package:angular / angular.dart

Do you have any idea? 你有什么主意吗? What did I missed. 我错过了什么

If you added the subdirectory after you ran pub get then it may not have the packages symlink folder. 如果您在运行pub get后添加了子目录,那么它可能没有packages symlink文件夹。 Try running pub get (from your apps root directory) again which should generate any missing packages in subdirectories that may have been added, without re-downloading any dependencies. 尝试再次运行pub get (从您的应用程序根目录),这应该在可能已添加的子目录中生成任何缺少的包,而无需重新下载任何依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM