@kovalenko/material-color-picker
v1.0.1
Published
Material color picker
Downloads
2
Maintainers
Readme
MaterialColorPicker
Material color picker
Installation
npm install @kovalenko/material-color-picker
ColorPicker
Selector: ngc-color-picker
Color picker. MatFormFieldControl
Title | Description
--- | ---
@Input() ngModel: string
| Color
@Output() ngModelChange: EventEmitter<string>
| ngModel change
Usage
First, import the ColorPickerModule to your module:
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {ColorPickerModule} from '@kovalenko/material-color-picker';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app';
@NgModule({
imports: [
BrowserModule,
ColorPickerModule
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule {
}
platformBrowserDynamic().bootstrapModule(AppModule);
import { Component } from '@angular/core';
@Component({
selector: 'app',
template: `
<form>
<mat-form-field>
<ngc-color-picker placeholder="Color" [(ngModel)]="color" name="color"></ngc-datetime-picker>
</mat-form-field>
</form>
`,
})
export class AppComponent {
date = '#ff0000';
}
License
MIT