Can't bind to 'treeNodes' since it isn't a known property of 'plx-districtTree'.

plx-districtTree是一个自定义组件,出现这个问题的原因基本就是模块加载的时候不能找到这个组件,说明没有正确引入这个组件,主要检测引入的问题!

注:按照通常引入做法,尽量引入Module,尽量避免直接引入component,以免漏掉某个组件的引入!

Uncaught Error: Template parse errors:
Can't bind to 'treeNodes' since it isn't a known property of 'plx-districtTree'.
1. If 'plx-districtTree' is an Angular component and it has 'treeNodes' input, then verify that it is part of this module.
2. If 'plx-districtTree' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
    </div>
    <div class="modal-body">
        <plx-districtTree [ERROR ->][treeNodes]="treeNodes" (treeNodesChange)="treeNodesChange($event)"></plx-districtTree>
    </div>
  "): ng:///ProperyModule/PlxMELocationComponent.html@63:26
'plx-districtTree' is not a known element:
1. If 'plx-districtTree' is an Angular component, then verify that it is part of this module.
2. If 'plx-districtTree' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    </div>
    <div class="modal-body">
        [ERROR ->]<plx-districtTree [treeNodes]="treeNodes" (treeNodesChange)="treeNodesChange($event)"></plx-districtT"): ng:///ProperyModule/PlxMELocationComponent.html@63:8

猜你喜欢

转载自blog.csdn.net/zwbHUST/article/details/82454437