-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New build system - support AOT #709
Conversation
efcc855
to
6473cce
Compare
Related to #629 |
Hello, any news here? I saw that you already had a good progress on this feature. Keep up the good work! |
@elekzalan thanks! I have some problems with Webpack/Karma right now. I always get errors like this:
When that is solved, it's nearly done. |
I don't know why the Unit tests fail with webpack. (The dependencies are mocked but are undefined when the constructor gets called). If anyone has an idea why this happens - help is really appreciated.
Steps to reproduce:
|
Problem solved, |
5afcdd5
to
db048cc
Compare
Adds a new build system for angular2-google-maps. BREAKING CHANGE: `provideLazyMapsAPILoaderConfig` is gone. Please use the `AgmCoreModule#forRoot` method instead. `LazyMapsAPILoaderConfig` is gone and is now a token named `LAZY_MAPS_API_CONFIG`. Please use the `AgmCoreModule#forRoot` instead.
db048cc
to
9ef0ccf
Compare
So now everything looks fine:
|
Update - If I recompile without declaring any markers, google map info, google map poly line in my html then it compiles successfully but that makes it not very useful :) When doing AOT build on my own project using this branch i get these errors :(Without AOT the build works fine) Then in my class I am getting these errors.
|
@rushstrike you are right - but I'm wondering why the ngc doesn't complain when I compile the whole project. Do you have an idea? |
One important point in using aot is this "Inputs, Outputs, View or Content Child(ren), Hostbindings, and any field you use from the template or annotate for Angular should be public". I'll have a closer look at the actual code tomorrow but I would the guidelines below as a start when reviewing the code. This is copied from the aot guide from:https://github.com/qdouble/angular-webpack2-starter/blob/master/README.md "The following are some things that will make AOT compile fail. Don’t use require statements for your templates or styles, use styleUrls and templateUrls, the angular2-template-loader plugin will change it to require at build time. |
@rushstrike thx for the detailed explanation.
This is the broken rule but I'm wondering why the ngc doesnt complain at build time. |
@SebastianM thanks for your great work! You are sort of helping me release to production! So any updates on this? |
@elekzalan I will release a new version today (because there are so many people asking for it) |
@SebastianM you are the best! Thank you so much for your work! |
WORK IN PROGRESS
TODO list ✍🏽: