Dart -1.24.2

Angular -4.0.0

Chrome -45.0.2454.104

pubspec.yaml

name: Test
description: A web app that uses AngularDart Components
version: 0.0.1
#homepage: https://www.example.com
#author: serhii <[email protected]>

environment:
sdk: '>=1.24.0 <2.0.0'

dependencies:
  angular: ^4.0.0
  angular_components: ^0.8.0

dev_dependencies:
  browser: ^0.10.0
  dart_to_js_script_rewriter: ^1.0.1

transformers:
- angular:
   entry_points:
      - web/applications/courier/courier.dart

- dart_to_js_script_rewriter

Chrome 产量:
package:angular/src/platform/bootstrap.dart:107
Exception: Unsupported  operation: Using the 'angular2' transformer is required.
Please see https://webdev.dartlang.org/angular/tutorial for setup  instructions,
and ensure your 'pubspec.yaml' file is configured to invoke the 'angular2'
transformer on your application's entry point.

如果我建立了这个-一切正常,如果我提供了这个(pub serve)-一切正常,但是我需要它在Chromium中工作。请帮忙!

最佳答案

确保您的入口点参数正确(路径和文件):

transformers:
- angular:
   entry_points:
      - web/applications/courier/courier.dart

重命名我的entry_point文件后发生了非常相同的错误,并且没有更新pubspec.yaml。

10-07 20:20