Skip to content

Commit

Permalink
Minor tweaks to the custom modal sample to remove dependencies on jQu…
Browse files Browse the repository at this point in the history
…ery and make things more angular-ish
  • Loading branch information
dwmkerr committed Oct 19, 2014
1 parent cd8c9bc commit d73313b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions samples/custom/custom.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<style type="text/css">
#overlay {
display: none;
position: fixed;
left: 25%;
top: 25%;
Expand All @@ -12,7 +11,6 @@
z-index: 100;
}
#fade {
display: none;
position: fixed;
left: 0%;
top: 0%;
Expand All @@ -25,9 +23,9 @@
z-index: 90;
}
</style>
<div id="overlay">
<div id="overlay" ng-show="display">
This is a custom modal. The angular-modal-service doesn't depend on bootstrap, you
can use any modal you want.
<a href ng-click="close()">Close</a>
</div>
<div id="fade"></div>
<div id="fade" ng-show="display"></div>
3 changes: 3 additions & 0 deletions samples/custom/customcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ var app = angular.module('sampleapp');

app.controller('CustomController', ['$scope', 'close', function($scope, close) {

$scope.display = true;

$scope.close = function() {
$scope.display = false;
close();
};

Expand Down
1 change: 0 additions & 1 deletion samples/sampleapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ app.controller('SampleController', ['$scope', 'ModalService', function($scope, M
templateUrl: "custom/custom.html",
controller: "CustomController"
}).then(function(modal) {
modal.element.css("display", "block");
modal.close.then(function(result) {
$scope.customResult = "All good!";
});
Expand Down

0 comments on commit d73313b

Please sign in to comment.