Expected 2 Arguments But Got 1. Viewchild Angular

[Solved] Expected 2 Arguments But Got 1. Viewchild Angular | Typescript - Code Explorer | yomemimo.com
Question : expected 2 arguments but got 1. viewchild angular

Answered by : ankur-prajapati

/*
error TS2554: Expected 2 arguments, but got 1.
In Angular 8, ViewChild takes 2 parameters
In Angular 9 default value is static: false, so doesn't need to provide param unless you want to use {static: true}
*/
@ViewChild(ChildDirective, {static: false}) Component
/*
I hope it will help you.
Namaste
*/

Source : | Last Update : Fri, 15 May 20

Answers related to expected 2 arguments but got 1. viewchild angular

Code Explorer Popular Question For Typescript