Last active
August 29, 2015 14:04
-
-
Save adasq/63ff1bb77c180c62a469 to your computer and use it in GitHub Desktop.
angular.modal
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
var modalController = function($scope, $modalInstance, arg) { | |
$scope.arg = arg; | |
$scope.submit = function() { | |
$modalInstance.close({}); | |
}; | |
$scope.cancel = function() { | |
$modalInstance.dismiss('cancel'); | |
}; | |
}; | |
var openModal = function(arg) { | |
var modalInstance = $modal.open({ | |
templateUrl: 'templates.modal.recommendationBuyOrder', | |
controller: modalController, | |
windowClass: 'class', | |
resolve: { | |
arg: function() { | |
return arg; | |
} | |
} | |
}); | |
modalInstance.result.then(function(result) { | |
//submit | |
}, function() { | |
//dismiss | |
}); | |
}; | |
===================== | |
<div class="modal-header"> | |
<span ng-click="closeModal()" class="clickable pull-right glyphicon glyphicon-remove"></span> | |
<h3 class="modal-title">{{'TRANSACTIONS.BENEFICIARY' | translate }}</h3> | |
</div> | |
<div class="modal-body"> | |
<pre>{{data | json}}</pre> | |
</div> | |
<div class="modal-footer"> | |
<!-- <button class="btn btn-success" ng-click="ok()">Zapisz</button>--> | |
<button class="btn btn-danger" ng-click="closeModal()">Zamknij</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment