-
Notifications
You must be signed in to change notification settings - Fork 20
Support AOT #4
Comments
Not supported yet, I will look into it |
I don't have time right now to help, but this link helped me when I was setting up AOT https://github.com/qdouble/angular-webpack2-starter#aot--donts |
@voliva any news ? :) |
It's in my TODO list, hopefully I can work soon on it, but it looks like a hard issue. Meanwhile, you can use the verbose version of the provider: Should look something like this
This workaround should allow AOT. I will try to find a way to make it easier while supporting AOT. |
Thanks for looking into that ! |
@voliva , after googling got this angular/angular#11262 solutions by @vicb this made build without errors. now the problem is when http.post is made nothing happens and yes i have replaced http with InterceptorService Update: |
I've been working all this morning on this issue and... it's hard. For AoT you can't call any function if it's not exported in the module declaration. This means that I can't even use For now I can't think how to get untied by that and come up with a solution. A future solution is when Typescript has something like Macros (there's an issue posted for that), where I can set up that I will push my work in a separate branch, just to keep it (feature/easyProvideAoT), but it doesn't work yet. Remember that using the "verbose" provider is AoT-compatible, I just need to update the docs on how to do that. |
@voliva thanks for the heads up. I'm using ngrx in my project and there's also a know bug with angular-cli so right now I can't compile with --aot anyway but as soon as they released a patch I'll also give a try to your verbose solution. |
+1 |
When I try to build the app with AOT, I get this error message :
Am I missing something or is it just not supported yet ?
The text was updated successfully, but these errors were encountered: