Рет қаралды 48,126
In this lecture, you are going to learn about @ViewChild decorator in angular. The @ViewChild decorator in angular is used to access an HTML element, a component or a directive in the component class.
Also remember that @ViewChild decorator returns the first matching element from the DOM and assign it to the property which we have decorated it with @ViewChild.
Let's understand @ViewChild decorator with an example.