Last active
August 29, 2015 14:02
-
-
Save charandas/140341acbc49a8a3f97b to your computer and use it in GitHub Desktop.
Modal instance controller that can support almost any modal view
This file contains 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
var ModalInstanceCtrl = function ($scope, $modalInstance, heading, messages, size, extraParams) { | |
extraParams = extraParams || {}; | |
$scope.heading = heading; | |
$scope.messages = messages; | |
$scope.size = size; | |
angular.extend($scope, extraParams); | |
$scope.ok = function () { | |
$modalInstance.close(); | |
}; | |
$scope.cancel = function () { | |
$modalInstance.dismiss('cancel'); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment