UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

27 lines (21 loc) 757 B
import { Component, ViewChild, ElementRef } from '@angular/core'; import { jqxColorPickerComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxcolorpicker'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent { @ViewChild('myColorPicker') myColorPicker: jqxColorPickerComponent; @ViewChild('colorLog') colorLog: ElementRef; colorChanged(event: any): void { this.colorLog.nativeElement.innerHTML = `<div>Color: #${event.args.color.hex}</div>`; } hueModeChanged(event: any): void { if (event.args.checked) { this.myColorPicker.colorMode('hue'); } else { this.myColorPicker.colorMode('saturation'); } } }