[英]Module not found: Error: Can't resolve '@angular/core/src/render3': ViewChildren QueryList
(角度 CLI:1.7.4)
我在組件中使用 ViewChildren。 如果我將其定義為,它工作正常
@ViewChildren(TestComponent) testComponents;
但是,當我將 testComponents 的類型指定為 QueryList 時:
@ViewChildren(TestComponent) testComponents: QueryList<TestComponent>;
它給出了錯誤:
ERROR in./src/app/components/search-component/search.component.ts Module not found: Error: Can't resolve '@angular/core/src/render3' in 'D:\Test Applications\test-application\src\app\components\search-component'
Delete node-module folder and run 'npm install' command from the root directory.This installs all dependencies listed in package.json file.If you want to install specific package,execute'npm i your package name. 讓我知道它是否不起作用?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.