1.ts文件引入對應(yīng)組件捐腿,寫法如下:
@viewChild('CFCL') mktCFCL: DemoCFCLComponent;
2.對應(yīng)html文件選擇器要綁上對應(yīng)的id俘种,即CFCL悉尾,寫法如下:
若DemoCFCLComponent組件對應(yīng)的selector為 k-demoCFCL
<k-demoCFCL #CFCL></k-demoCFCL>
1.ts文件引入對應(yīng)組件捐腿,寫法如下:
@viewChild('CFCL') mktCFCL: DemoCFCLComponent;
2.對應(yīng)html文件選擇器要綁上對應(yīng)的id俘种,即CFCL悉尾,寫法如下:
若DemoCFCLComponent組件對應(yīng)的selector為 k-demoCFCL
<k-demoCFCL #CFCL></k-demoCFCL>