Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 4d10751

Browse files
committed
demo(popoverWindow): add demonstration
1 parent 215804d commit 4d10751

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

src/popover/docs/demo.html

+17-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@
22
<h4>Dynamic</h4>
33
<div class="form-group">
44
<label>Popup Text:</label>
5-
<input type="text" ng-model="dynamicPopover" class="form-control">
5+
<input type="text" ng-model="dynamicPopover.content" class="form-control">
66
</div>
77
<div class="form-group">
88
<label>Popup Title:</label>
9-
<input type="text" ng-model="dynamicPopoverTitle" class="form-control">
9+
<input type="text" ng-model="dynamicPopover.title" class="form-control">
1010
</div>
11-
<button popover="{{dynamicPopover}}" popover-title="{{dynamicPopoverTitle}}" class="btn btn-default">Dynamic Popover</button>
12-
11+
<div class="form-group">
12+
<label>Popup Template:</label>
13+
<input type="text" ng-model="dynamicPopover.templateUrl" class="form-control">
14+
</div>
15+
<button popover="{{dynamicPopover.content}}" popover-title="{{dynamicPopover.title}}" class="btn btn-default">Dynamic Popover</button>
16+
17+
<button popover-window="{{dynamicPopover.templateUrl}}" popover-window-title="{{dynamicPopover.title}}" class="btn btn-default">Popover With Template</button>
18+
19+
<script type="text/ng-template" id="templatePopover.html">
20+
<div class="form-group">
21+
<label>Popup Title:</label>
22+
<input type="text" ng-model="dynamicPopover.title" class="form-control">
23+
</div>
24+
</script>
1325
<hr />
1426
<h4>Positional</h4>
1527
<button popover-placement="top" popover="On the Top!" class="btn btn-default">Top</button>
@@ -28,4 +40,5 @@ <h4>Triggers</h4>
2840
<h4>Other</h4>
2941
<button Popover-animation="true" popover="I fade in and out!" class="btn btn-default">fading</button>
3042
<button popover="I have a title!" popover-title="The title." class="btn btn-default">title</button>
43+
<button ng-init="wow = 'yes'" popover-window="something.html" class="btn btn-default">title</button>
3144
</div>

src/popover/docs/demo.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
angular.module('ui.bootstrap.demo').controller('PopoverDemoCtrl', function ($scope) {
2-
$scope.dynamicPopover = 'Hello, World!';
3-
$scope.dynamicPopoverTitle = 'Title';
2+
$scope.dynamicPopover = {
3+
content: 'Hello, World!',
4+
templateUrl: 'templatePopover.html',
5+
title: 'Title'
6+
};
47
});

0 commit comments

Comments
 (0)