akserg / ng2-slim-loading-bar

Angular 2 component shows slim loading bar at the top of the page.
MIT License
358 stars 93 forks source link

Can't use it with AoT compilation #24

Closed dhardtke closed 7 years ago

dhardtke commented 7 years ago

Hey,

Your package seems to not be AoT compatible:

Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function.

I don't know why it happens but I do know it has to do with the definition of the .forRoot() method.

akserg commented 7 years ago

Hi @dhardtke I'm busy with your issue.

scarmarco commented 7 years ago

Same for me!

a5hik commented 7 years ago

Same issue here.

zk1169 commented 7 years ago

Same issue

akarabach commented 7 years ago

Same issue

hartherbert commented 7 years ago

Somebody got a solution for this ?

thanhnhan2tn commented 7 years ago

I have the same issue on used with IONIC 2rc0, Somebody got a solution for this ?

hartherbert commented 7 years ago

not yet. And the owner of this hasn't replied yet. I've built my own progress bar with the HTML5 Tag and SCSS style and it's working fine by now. It looks like this one and works very similar, so it's fine for me.

jskrzypek commented 7 years ago

@HartHerbert actually it looks like the owner @akserg is working on this on the aot branch, but the fix hasn't been finished/published yet.

I forked the branch and made some headway on fixing the remaining bugs and I think it's more or less working. You can test it by doing an npm install jskrzypek/ng2-slim-loading-bar#aot and then trying to run ngc.

However, we've also decided not to continue using the module/component so I'm not planning to make a PR or suggest changes. I did, however, make a cleaner branch with only the relevant & substantive changes here (https://jskrzypek/ng2-slim-loading-bar/tree/aot-clean) if anyone wants to pick up where I left off.

akserg commented 7 years ago

Hi all,

Please try 2.0.5 and confirm that you issue was fixed.

Big thanks to @jskrzypek.

akarabach commented 7 years ago

Issue was fixed.