AngularJS Tutorial 19- Nested Controllers

Pubblicato il: 06 febbraio 2017
sul canale di: Nisha Singla
1,741
39

In this tutorial, we will learn about Nested Controllers or Nested Scope in angularJS

As of now we are familiar with scope and rootScope in AngularJS. But Controllers can also create nested scope in AngularJS. When you use any controller inside any other controller it will create a nested scope

In case of Nested Scope or Nested Controller , Inner controller act like a child scope and outer Controller act like a parent Scope. In this case child controller or scope have access of all the data of parent scope .

If you want to access parent data inside child controller you need to use $parent property
When you use nested scope you need to be very careful while referring your scope.
When Nested level increases you need to use $parent property each time to refer the parent . Suppose you want to refer grandparent scope so you need to use $parent.$parent.title .

Visit complete playlist on angular js @    • AngularJS Tutorial 1  -  Introduction  

Visit my facebook page@

  / angularjs4beginners  


In questa pagina del sito puoi guardare il video online AngularJS Tutorial 19- Nested Controllers della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Nisha Singla 06 febbraio 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,741 volte e gli è piaciuto 39 spettatori. Buona visione!