Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 5, 2017 19:29
Show Gist options
  • Save javaeeeee/dba8fdf69f123a66621b48f52f3956b1 to your computer and use it in GitHub Desktop.
Save javaeeeee/dba8fdf69f123a66621b48f52f3956b1 to your computer and use it in GitHub Desktop.
An AngularJS controller used to explain nested scopes.
(function () {
angular.module('app')
.controller('ChildController', ChildController);
ChildController.$inject = ['$scope'];
function ChildController($scope) {
$scope.myModel = 'Child controller\'s myModel';
$scope.onlyChild = 'Child\'s variable';
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment