Created
December 2, 2015 21:53
-
-
Save ischenkodv/a60c0c7d2e88e7d111ce to your computer and use it in GitHub Desktop.
Extend Angular controllers.
From http://stackoverflow.com/questions/16539999/angular-extending-controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.controller('CtrlImplAdvanced', ['$scope', '$controller', function ($scope, $controller) { | |
// Initialize the super class and extend it. | |
angular.extend(this, $controller('CtrlImpl', {$scope: $scope})); | |
// … Additional extensions to create a mixin. | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment