Skip to content

Instantly share code, notes, and snippets.

@ansmith
Last active August 29, 2015 13:56
Show Gist options
  • Save ansmith/8960035 to your computer and use it in GitHub Desktop.
Save ansmith/8960035 to your computer and use it in GitHub Desktop.
myApp.controller('MyWidgetControl', function($scope, $controller) {
$controller('AbstractWidgetControl', {$scope: $scope});
//"Public" functions
$scope.myFunction = function() {
//...
};
//Private functions
function myPrivateFn() {
}
});
@ansmith
Copy link
Author

ansmith commented Mar 10, 2014

I actually wanted hoisting here. I wanted the private stuff available immediately in case there was any initialization done inline at the top, but I wanted them at the bottom since they're not the key API functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment