0

(Angular CLI: 1.7.4)

I am using ViewChildren in a component. It is working fine if I define it as

@ViewChildren(TestComponent) testComponents;

However, when I specify the type of testComponents as QueryList:

@ViewChildren(TestComponent) testComponents: QueryList<TestComponent>;

it gives error:

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'

1 Answer 1

0

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. Let me know if it dosen't work?

Sign up to request clarification or add additional context in comments.

1 Comment

Tried that. The node_modules folder already contains @angular/core/src/render3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.