Skip to content
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

Using color picker with Angular 2.1.0 causes problems #46

Closed
garethlewis opened this issue Oct 20, 2016 · 7 comments
Closed

Using color picker with Angular 2.1.0 causes problems #46

garethlewis opened this issue Oct 20, 2016 · 7 comments

Comments

@garethlewis
Copy link

After including the ColorPickerModule in my AppModule class. Any attempt to use the Color Picker with a webpack compiled app produces the following message in console.

Uncaught Error: Unexpected value 'e' imported by the module 'AppModule'(…)

Not particularly useful I know. Can you give me a rough guide as to when the Color Picker will be moving towards Angular 2.1.0?

The problem does not occur with SystemJS, but that is expected, as SystemJS does not package up the requisite parts from the angular node modules.

Also strangely, when not including the color picker and not uglyfying the code, the app.js chunk is 34kb. When including colorpicker and using Angular 2.1.0, the app.js is 900kb. It appears as if the the entire of the Angular 2.0.0 system that the color picker requires is included in app.js.

Alberplz added a commit that referenced this issue Oct 20, 2016
New options added:
cpSaveClickOutside, cpOKButton, cpOKButtonClass, cpOKButtonText,
cpDialogDisplay, cpAlphaChannel
#13, #15, #32, #42, #44, #45, #46
@sanohin
Copy link

sanohin commented Oct 20, 2016

It fails with Angular 2.0.0 with error "Uncaught Error: Unexpected value 'e' imported by the module 'AppModule'(…)" while the previous version failed with "Uncaught Error: Unexpected value 't' imported by the module 'AppModule'(…)".
I use webpack to build an app.

@garethlewis
Copy link
Author

For some reason, if I use Angular 2.0.0 and webpack it does work, but from Angular 2.0,1 onwards it fails. I can only guess as to what has changed, but the Angular 2 did introduce AOT, though that could be a red herring in this case.

@Alberplz
Copy link
Owner

There is a example with webpack in the project. I've compiled with Angular 2.0.0 and Angular 2.1.0 and it works

@garethlewis
Copy link
Author

Thanks, I have just updated my project to use version 1.3.0 and it now loads the color picker correctly.

@stevenxxiu
Copy link

It's started to fail again as of angular 2.2.3 with the same error in the first post , here are my versions:

"@angular/common": "^2.2.3",
"@angular/compiler": "^2.2.3",
"@angular/core": "^2.2.3",
"@angular/forms": "^2.2.3",
"@angular/http": "^2.2.3",
"@angular/platform-browser": "^2.2.3",
"@angular/platform-browser-dynamic": "^2.2.3",
"@angular/router": "^3.2.3",
"angular2-color-picker": "^1.3.0",

@bengle
Copy link

bengle commented Dec 9, 2016

In version 2.2.0 , I get this error again.

@avoliva
Copy link

avoliva commented Nov 20, 2017

I'm getting this error too. I'm using the latest version of angular which as of right now is 5.0.2.

I'm assuming this library hasn't been updated for angular 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants