触控回调在Angular中的正确实现
我想知道在实现NG_VALUE_访问器的自定义控件中,触摸回调的正确实现是什么触控回调在Angular中的正确实现,angular,Angular,我想知道在实现NG_VALUE_访问器的自定义控件中,触摸回调的正确实现是什么 registerOnTouched(touched: () => {}) { this.touched = touched; } 我特别想知道,单击下拉菜单,但单击外部而不选择任何值是否应该调用this.toucted()。触摸回调是按字母顺序执行还是仅反映控件的值更改 /** * A control is marked `touched` once the user has triggered
registerOnTouched(touched: () => {}) {
this.touched = touched;
}
我特别想知道,单击下拉菜单,但单击外部而不选择任何值是否应该调用this.toucted()
。触摸回调是按字母顺序执行还是仅反映控件的值更改
/**
* A control is marked `touched` once the user has triggered
* a `blur` event on it.
*/
get touched(): boolean { return this._touched; }