File
Metadata
selector |
n52-color-selector |
templateUrl |
./color-selector.component.html |
colorList
|
Type : string[]
|
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'n52-color-selector',
templateUrl: './color-selector.component.html'
})
export class ColorSelectorComponent {
@Input()
public color: string;
@Input()
public colorList: string[];
@Output()
public onColorChange: EventEmitter<string> = new EventEmitter<string>();
}
<div class="colorpicker">
<span [(colorPicker)]="color" [cpDialogDisplay]="'inline'" [cpCancelButton]="true" [cpCancelButtonText]="'Reset'" [cpPresetColors]="colorList"
[cpToggle]="true" [cpPresetLabel]="'Presets:'" (colorPickerChange)="onColorChange.emit($event)">
</span>
</div>
Legend
Html element with directive