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
text/typescript
import { Component, ViewChild, ElementRef } from '@angular/core';
import { jqxColorPickerComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxcolorpicker';
({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
('myColorPicker') myColorPicker: jqxColorPickerComponent;
('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');
}
}
}