(角度 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'