Angular2 No value accessor for form control with unspecified name attribute

错误:

Angular2  No value accessor for form control with unspecified name attribute

 

 

查询网上的资料报错的原因是是双向绑定 [(ngModel)] 不能绑定再非常规区域(具体的原因不清楚)

此次绑定的场景

Angular2  No value accessor for form control with unspecified name attribute

 

 

 <data-tree>为一个自定义的组件
 
解决:
在组件的标签中增加  ngDefaultControl 即可
Angular2  No value accessor for form control with unspecified name attribute

 

 

 

Angular2 No value accessor for form control with unspecified name attribute

上一篇:面试官一上来就问我Chrome底层原理和HTTP协议(万字长文)


下一篇:[Oracle] SQL*Loader 详细使用教程(2)- 命令行参数