1. 錯誤
在寫一個新組件的時候,在父組件里面注冊就報錯 TypeError: Cannot create property 'isRootInsert' on string 'xxx'
2. 原因
原因是在子組件中沒有寫@Component({})
無論子組件中有沒有子子組件需要注冊,都要寫上@Component({})
在寫一個新組件的時候,在父組件里面注冊就報錯 TypeError: Cannot create property 'isRootInsert' on string 'xxx'
原因是在子組件中沒有寫@Component({})
無論子組件中有沒有子子組件需要注冊,都要寫上@Component({})
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。