vulcanize for angular.dart?

2019-02-24 23:33发布

问题:

There is vulcanize like tool for polymer.dart (done by polymer transformer), that nicely puts all the imported components inline and makes it easy to serve the app by reducing the number of round trips to server. Is there any tool like vulcanize for angular.dart projects? esp. the one that can pull all the component's html into a single file and make it easy for deploying angular.dart app?

回答1:

You can use template-cache-transformer. From it's home page:

The Template Cache Transformer generates the template cache and 
optionally merges the CSS and HTML of AngularDart components into
a hosting Web page.


回答2:

AngularDart has the template_cache_generator which creates a Dart file to pre-populate Angular's template cache.

As far as I know, we have not done to work to include the template cache generator in the Angular transformer group. There is no technical reason why it can't be there.