Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Sharing data between components

$
0
0
  1. <parent-comp>
  2.   <child-comp child-data-prop="dataProp"></child-comp>
  3. </parent-comp>

In this simplest example

child-comp's scope will receive childDataProp from parent's scope attribute dataProp (if it exists in parent-comp's scope, it will be taken from it, if not - it will be looked up in upper scopes). Two way binding will be established between  child-comp's  childDataProp and  dataProp from upper scope.

So from it you can conduct how you can share data in any structure

Viewing all articles
Browse latest Browse all 3491

Trending Articles