Skip to content

Instantly share code, notes, and snippets.

@tokafish
Last active August 29, 2015 13:56
Show Gist options
  • Save tokafish/8920098 to your computer and use it in GitHub Desktop.
Save tokafish/8920098 to your computer and use it in GitHub Desktop.
Nested scopes
app.controller('OuterController', function($scope) {
$scope.outer = 'From the outside';
});
app.controller('InnerController', function($scope) {
$scope.inner = 'looking in.';
});
<div ng-controller="OuterController">
<div ng-controller="InnerController">
{{outer}}, {{inner}}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment