What is the difference between @ViewChild and @ViewChildren in Angular?

Forums AngularWhat is the difference between @ViewChild and @ViewChildren in Angular?
Staff asked 2 years ago

Answers (1)

Add Answer
prinkesha lathidadiya Marked As Accepted
Staff answered 2 years ago

Working with @ViewChildren is similar to working with @ViewChild, however @ViewChildren returns a list of element references as opposed to just one reference. It is employed to refer to several components. The list of the element that the variable refers to may then be iterated.

Subscribe

Select Categories