关于AngularDart,如何解决angular_router:^ 2.0.0-alpha与角度5.0.0-alpha不兼容?

时间:2017-10-30 13:05:23

标签: dart angular-dart angular-router

今天我开始在git#676(https://github.com/dart-lang/angular/issues/676)中尝试@matanlurey的建议。在我的项目pubspec.yaml文件中:

environment:
  sdk: '>=1.24.0 <2.0.0'
dependencies:
  angular: ^5.0.0-alpha
  angular_components: ^0.9.0-alpha
  angular_forms: ^1.0.1-alpha
  angular_router: ^2.0.0-alpha
  browser: ^0.10.0
  dart_to_js_script_rewriter: ^1.0.1
  sass_builder: ^1.0.0

但解决依赖关系...

Incompatible version constraints on angular:
- angular_components 0.9.0-alpha depends on version 5.0.0-alpha
- angular_forms 1.0.1-alpha depends on version ^5.0.0-alpha
- angular_router 2.0.0-alpha depends on version ^4.0.0
- huastecappadmin depends on version ^5.0.0-alpha
Process finished with exit code 1

任何想法?

1 个答案:

答案 0 :(得分:0)

您可以尝试添加

dependency_overrides:
  angular: ^5.0.0-alpha

但它可能无效。 在这种情况下,您需要等到释放与Angular 5兼容的angular_router更新。

另见https://github.com/dart-lang/angular/issues/676