Giter Site home page Giter Site logo

dolanmiu / ng-color Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 6.0 542 KB

Simple Angular color picker components which follow Angular best practices. No Frills.

Home Page: https://stackblitz.com/edit/ng-color-demo

TypeScript 98.06% CSS 0.23% JavaScript 0.94% HTML 0.78%
color-picker ng-color angular colour color angular2 component ng2 picker ngx

ng-color's People

Contributors

alimahmood avatar dolanmiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ng-color's Issues

Cannot Use Template

I receive this error on runtime when starting my application:
Unhandled Promise rejection: Template parse errors: 'ng-color' is not a known element:

When compiling my application, I receive this error:
ERROR in NgColorModule is not an NgModule

I'm using Angular 4.0.1, and I've followed your instructions for including this module as an import.

StartHex - ExpressionChangedAfterItHasBeenCheckedError

In some cases when using startHex - seems like it depend on color - I got that error - ERROR Error when ngColor picker is displayed - ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '#897A7A'. Current value: '#8A7B7B'.

The value I use in startHex is 897A7A but ngColor module recalculates it to 8A7B7B and then trigger that error message.

I noticed that also colorChange event is called twice.

I'm using color property binding with [startHex]="colorVariable". When I add directly some string to startHex property, the error does not appear.

Initializers are not allowed in ambient contexts.

Typescript Error
Initializers are not allowed in ambient contexts.
...m/node_modules/ng-color/saturation-lightness-box/saturation-lightness-image.d.ts

  | export declare const IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGa...

ng build --prod failed

when I run command: 'ng build --prod'
I get this ERROR:

ERROR in Error encountered resolving symbol values statically. Expression form not supported (position 13:14 in the original .ts file), resolving symbol ɵe in /home/will/src/workbench2/node_modules/ng-color/ng-color.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/will/src/workbench2/src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

No problem with 'ng server' and 'ng build'

Problem with NPM link and Angular 4

I get the following error message when I try to run the module in Angular 4 using NPM link: Unexpected value 'NgColorModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

Steps to reproduce:
Create a new Angular 4 application.
Git clone the ng-color repo
Run gulp watch in the ng-color repo
cd ./dist and npm link
Go to Angular 4 application and run npm link ng-color

Setting color value

Hi.
It seems I can't set the value of the color composant. Can you add this ? :)
I would like to set this value through an input which contains an hex color
Thanks

Angular5 -prod -aot not working

Hi,

currently im using your module and trying to build with -prod and -aot flag. Im getting errors connected with this module. Is there any chance this to be fixed soon ?

Errors:

Uncaught TypeError: e is not a constructor

Warning: (a lot of warning of this type)

/node_modules/ng-color/ng-color.ngfactory.js
107:319-324 "export 'ɵj' (imported as 'i1') was not found in 'ng-color'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.