-
Notifications
You must be signed in to change notification settings - Fork 248
AngularDart apps do not work without the transformer #1344
Comments
Could you pub upgrade and try again ? (what is your DI version) |
Just tried, all the dependencies are up to date. di version is 2.0.2. |
Ah but you're using the compiled version, right ? |
Not sure what you mean by compiled version. The issue is reproducible in both - Chromium (37.0.2062.0 (287872) and Chrome (36.0.1985.125). |
Do you launch via the Dart Editor (or pub serve) ? |
|
Then the di transformer is executed... and is not compatible with the dynamic app factory. |
So, di transformer is always executed even if I run the app in Dartium? How to run in a completely dynamic mode then? The solution you mentioned won't enable dynamic mode. BTW, The same behavior even if I launch app using Dart Editor (I believe Dart Editor uses pub serve internally for a long time by now). |
I think this is related to http://dartbug.com/19168 |
simpleHTTPServer or any similar solution, I think there is an equivalent in Dart now
Yep, DE uses |
@zoechi thanks. Indeed, they seem related. There is an issue with @vicb Sorry for bothering you 😉, but I still have questions.
|
As of today May be you can open an issue on the DI repo to initiate a discussion on this topic. One solution would be to not run the DI transformer by default but to trigger it from the client lib (angular in our case). This would probably solve your issue - still we need to make sure it actually works. On the flip side running the dynamic version makes little sense. The best would be to have #1276 solved |
Running the dynamic version might only be interesting in setups where a web server different from If Angular doesn't work without a transformers the 3rd party server needs to be configured so that it forwards specific requests to |
Hopefully it works w/o transformers :) |
It does, I develop by serving my app through my custom server without any transformers at all. |
@zoechi Sorry, I don't clearly understand the point. Why dynamic mode is only interesting for non-pub web servers? We do want to run our app using
And in fact AngularDart apps do not work without transformers right now if they hosted using |
I just tried to provide a use case that demonstrates that support for running without transformer is useful/important. If there are other use cases I was not aware of this is fine too ;-) |
Out of scope for angular.dart, we don't plan to support non-transformer workflows (sorry). |
As far as I know it is planned to run transformers in pub serve only when a non-Dart browser requests a site. From the discussions at dartbug.com I got the impression it is considered a bug that transformers are run when Dartium requests a page. |
AngularDart 0.13.0 now requires angular transformer to be enabled. Here is an example of a minimal app to reproduce:
index.html:
main.dart:
Without the enabled transformer it throws an exception:
My understanding is if I use
applicationFactory().run()
I run DI in the dynamic mode, so it shouldn't require any static code transformation.Manually setting
Module.DEFAULT_REFLECTOR = new DynamicTypeFactories();
doesn't help, it still requires transformer to be enabled.Due to the issue with Angular transformer, it brings major inconvenience in development workflow, so I'd rather avoid it for now.
The text was updated successfully, but these errors were encountered: