更新时间:2023-10-14 08:57:58
尝试一下:
this.onModelChange.emit(new String(value));
这里是对应的监听器 https://plnkr.co/edit/2KqCGggSDOdXhjiJEw68?p=preview
我会为此编写而不是组件验证自定义管道: https://plnkr.co/edit/xCvnJ9682lV0Z1sBcK68?p =预览
I would write instead of component validation custom pipe for that: https://plnkr.co/edit/xCvnJ9682lV0Z1sBcK68?p=preview
也许 http://blog.jhades.org/how-does-angular-2-change-detection-really-work/