Angular component interaction [Part 5]

Veröffentlicht am: 22 November 2017
auf dem Kanal: 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


Auf dieser Seite können Sie das Online-Video Angular component interaction [Part 5] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Techie Ocean 22 November 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,949 Mal angesehen und es wurde von 17 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!