Angular component interaction [Part 5]

Published: 22 November 2017
on channel: Techie Ocean
2,949
17

This tutorial shows how to call the child component's functions from the parent component using the @Viewchild.
In previous tutorial, we have seen how to call child function from parent component using local variable. But the drawback of local variable method is that it is accessible only in the parent template where it is defined. If we want to use it in parent component class then it is not accessible. So to overcome this drawback we use @Viewchild method. Through Viewchild we inject the child component in the parent component class and thus it is acessible in the class of parent component.
To demonstrate this, the tutorial implements a timer functionality. And the timer can be started or paused by calling the internal functions of the child component from the parent component.

#Angular #Angular 8 #Angular7 #Angular 6 #Angular 5


On this page of the site you can watch the video online Angular component interaction [Part 5] with a duration of hours minute second in good quality, which was uploaded by the user Techie Ocean 22 November 2017, share the link with friends and acquaintances, this video has already been watched 2,949 times on youtube and it was liked by 17 viewers. Enjoy your viewing!