Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 5, 2017 19:17
Show Gist options
  • Save javaeeeee/03f35bfa9c6ecbf1148596c03915a07e to your computer and use it in GitHub Desktop.
Save javaeeeee/03f35bfa9c6ecbf1148596c03915a07e to your computer and use it in GitHub Desktop.
AngularJS nested scopes.
<section ng-controller="ParentController">
<h4>Parent Scope</h4>
<p>{{onlyParent}}</p>
<p>{{myModel}}</p>
<article ng-controller="ChildController">
<h5>Child Scope</h5>
<p>{{onlyChild}}</p>
<p>{{myModel}}</p>
<p>{{onlyParent}}</p>
</article>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment