错误应用程序布局AngularDart中角度组件的组件

时间:2017-08-20 19:45:06

标签: dart angular-dart angular-components dart-pub

尝试在我的项目中实现角度组件的新发布的应用程序布局组件。 即使导入import'package:angular_components/angular_components.dart'; dart,也会导致MaterialIconComponent, MaterialPersistentDrawerDirective, MaterialTemporaryDrawerComponent,

的错误
[Info from Dart2JS]:
Compiling my_app|web/main.dart...
[Error from Dart2JS on my_app|web/main.dart]:
web\main.template.dart:16:1:
Can't read 'package:my_app/views/app_component/app_component.template.dart' (Could not find asset my_app|lib/views/app_component/app_component.template.dart.).
import 'package:my_app/views/app_component/app_component.template.dart' as i1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS on my_app|web/main.dart]:
web\packages\my_app\views\app_component\app_component.dart:25:5:
Not a compile-time constant.
    MaterialIconComponent,
    ^^^^^^^^^^^^^^^^^^^^^
[Dart2JS on my_app|web/main.dart]:
3 warning(s) suppressed in package:my_app.
[Info from Dart2JS]:
Took 0:00:07.975139 to compile my_app|web/main.dart.
Build failed.

错误:介体

  Found 3 mismatching dependencies on package:build:
* angular2 requires  ^0.9.0
* angular_components->angular requires  ^0.10.0
* angular_components->angular->angular_compiler requires  ^0.10.0

项目中的包依赖

dependencies:
angular2: "^3.1.0"
angular_components: "^0.6.0-alpha+3"
browser: "^0.10.0+2"
dart_to_js_script_rewriter: "^1.0.3"
firebase: "^4.1.0"

1 个答案:

答案 0 :(得分:1)

dependencies:
  angular: ^4.0.0-alpha+3
  angular_components: ^0.6.0-alpha+3