mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(demo): make our value accessors more closely match Angular's
This commit is contained in:
@ -16,13 +16,11 @@ export class IonCheckboxValueAccessorDirective implements ControlValueAccessor {
|
||||
onTouched: () => void;
|
||||
|
||||
writeValue(value: any) {
|
||||
console.log('writeValue', value);
|
||||
this.renderer.setProperty(this.element.nativeElement, 'checked', value);
|
||||
}
|
||||
|
||||
@HostListener('change', ['$event.target.checked'])
|
||||
_handleIonChange(value: any) {
|
||||
console.log('handle change', value);
|
||||
this.onChange(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user