对于angular8来说,必须要加上{static:true}才可以正常工作。 @ViewChild('dlg1', {static: true}) dlg1: CreateFolderDlgComponent;