Angular component interaction [Part 5]

Pubblicato il: 22 novembre 2017
sul canale di: 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


In questa pagina del sito puoi guardare il video online Angular component interaction [Part 5] della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Techie Ocean 22 novembre 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,949 volte e gli è piaciuto 17 spettatori. Buona visione!