johannesjo / angular2-promise-buttons

Chilled loading buttons for angular2
https://johannesjo.github.io/angular2-promise-buttons/#demo
MIT License
86 stars 28 forks source link

Error when start with Angular 2 #3

Closed hvqthong closed 7 years ago

hvqthong commented 7 years ago

I applied promise button to my project use @angular version 2.4.8 When start project with webpack, I get error message "core_1.InjectionToken is not a constructor"

johannesjo commented 7 years ago

Thanks for reporting! I'll have a look at it.

johannesjo commented 7 years ago

The problem is that the library is using Render2 and InjectionToken over Renderer and OpaqueToken. Both are only introduced in angular 4. I'm working on a solution to integrate a compatibility layer. I'm glad for any suggestions how to do implement such a thing.

For now you would have to upgrade to Angular 4 to use this lib, but I'll keep you updated.

I also opened a question on stackoverflow: http://stackoverflow.com/questions/43913503/how-to-make-angular-4-apps-compatible-with-angular-2

johannesjo commented 7 years ago

Ok I modified everything to also work with Angular2. Could you please check, if it works for you with v1.0.7?

hvqthong commented 7 years ago

It worked Tk sir 😄