Skip to content

Commit

Permalink
demo(modal): add modal demo
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Dec 30, 2012
1 parent 4acc04f commit ca9ef8d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/modal/docs/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div ng-controller="ModalDemoCtrl">
<button class="btn" ng-click="open()">Open me!</button>
<div modal="shouldBeOpen" close="close()">
<div class="modal-header">
<h4>I'm a modal!</h4>
</div>
<div class="modal-body">
with some content...
</div>
<div class="modal-footer">
<button class="btn btn-warning cancel" ng-click="close()">Cancel</button>
</div>
</div>
</div>
11 changes: 11 additions & 0 deletions src/modal/docs/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var ModalDemoCtrl = function ($scope) {

$scope.open = function () {
$scope.shouldBeOpen = true;
};

$scope.close = function () {
$scope.closeMsg = 'I was closed at: ' + new Date();
$scope.shouldBeOpen = false;
};
};
1 change: 1 addition & 0 deletions src/modal/docs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bootstrap's modal directive.

0 comments on commit ca9ef8d

Please sign in to comment.