This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +22
-6
lines changed
2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 2
2
< h4 > Dynamic</ h4 >
3
3
< div class ="form-group ">
4
4
< 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 ">
6
6
</ div >
7
7
< div class ="form-group ">
8
8
< 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 ">
10
10
</ 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 >
13
25
< hr />
14
26
< h4 > Positional</ h4 >
15
27
< button popover-placement ="top " popover ="On the Top! " class ="btn btn-default "> Top</ button >
@@ -28,4 +40,5 @@ <h4>Triggers</h4>
28
40
< h4 > Other</ h4 >
29
41
< button Popover-animation ="true " popover ="I fade in and out! " class ="btn btn-default "> fading</ button >
30
42
< 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 >
31
44
</ div >
Original file line number Diff line number Diff line change 1
1
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
+ } ;
4
7
} ) ;
You can’t perform that action at this time.
0 commit comments