Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 5, 2017 19:01
Show Gist options
  • Save javaeeeee/51a66d05525700a83f9140ea9c1a27d9 to your computer and use it in GitHub Desktop.
Save javaeeeee/51a66d05525700a83f9140ea9c1a27d9 to your computer and use it in GitHub Desktop.
An AngularJS controller to show that variables with the same name can exist in different scopes.
(function(){
angular.module('app')
.controller('GoodbyeController', GoodbyeController);
GoodbyeController.$inject = ['$scope'];
function GoodbyeController($scope){
$scope.myModel = 'Everyone';
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment