|
11 | 11 | <div ng-controller="sampleCtrl"> |
12 | 12 | <button data-placement="left" ng-click="open($event)">open</button> |
13 | 13 | <p>ddddd</p> |
14 | | - <p>ddddd</p> <p>ddddd</p> <p>ddd <button data-placement="left" ng-click="open($event)">open</button> <button data-placement="right" ng-click="open($event)">open right</button>dddffffffffffffddddddffffffffffffddddddffffffffffffddddddffffffffffffddddddffffffffffff <button data-placement="left" ng-click="open($event)">open</button> <button data-placement="left" ng-click="open($event)">open</button> <button data-placement="right" ng-click="open($event)">open right</button> <button data-placement="left" ng-click="open($event)">open</button> <button data-placement="left" ng-click="open($event)">open</button> <button data-placement="left" ng-click="open($event)">open</button></p> <p>ddddd</p> <p>ddddd</p> <button data-placement="left" ng-click="open($event)">open</button><p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> |
15 | | - <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> <p>ddddd</p> |
| 14 | + |
| 15 | + <p>ddddd</p> |
| 16 | + |
| 17 | + <p>ddddd</p> |
| 18 | + |
| 19 | + <p>ddd |
| 20 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 21 | + <button data-placement="right" ng-click="open($event)">open right</button> |
| 22 | + dddffffffffffffddddddffffffffffffddddddffffffffffffddddddffffffffffffddddddffffffffffff |
| 23 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 24 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 25 | + <button data-placement="right" ng-click="open($event)">open right</button> |
| 26 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 27 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 28 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 29 | + </p> |
| 30 | + <p>ddddd</p> |
| 31 | + |
| 32 | + <p>ddddd</p> |
| 33 | + <button data-placement="left" ng-click="open($event)">open</button> |
| 34 | + <p>ddddd</p> |
| 35 | + |
| 36 | + <p>ddddd</p> |
| 37 | + |
| 38 | + <p>ddddd</p> |
| 39 | + |
| 40 | + <p>ddddd</p> |
| 41 | + |
| 42 | + <p>ddddd</p> |
| 43 | + |
| 44 | + <p>ddddd</p> |
| 45 | + |
| 46 | + <p>ddddd</p> |
| 47 | + |
| 48 | + <p>ddddd</p> |
| 49 | + |
| 50 | + <p>ddddd</p> |
| 51 | + |
| 52 | + <p>ddddd</p> |
| 53 | + |
| 54 | + <p>ddddd</p> |
| 55 | + |
| 56 | + <p>ddddd</p> |
| 57 | + |
| 58 | + <p>ddddd</p> |
| 59 | + |
| 60 | + <p>ddddd</p> |
16 | 61 | <button data-placement="bottom" ng-click="open($event)">open</button> |
17 | 62 | </div> |
18 | 63 | <script src="../bower_components/jquery/dist/jquery.js"></script> |
|
22 | 67 | <script> |
23 | 68 | var app = angular.module("app", ["wt.pbox"]); |
24 | 69 | app.controller("sampleCtrl", ["$scope", "$pbox", function ($scope, $pbox) { |
25 | | - var pbox = null; |
26 | 70 | $scope.open = function ($event) { |
27 | | - pbox = $pbox.open({ |
28 | | - event : $event, |
29 | | - templateUrl:"box.html", |
| 71 | + var pbox = $pbox.open({ |
| 72 | + event : $event, |
| 73 | + templateUrl: "box.html", |
30 | 74 | //template : '<div><a>ssss111111 {{aaa}}</a> dddd <button ng-click="add()">click</button></div>', |
31 | | - controller: function ($scope,$pboxInstance) { |
| 75 | + controller : function ($scope, $pboxInstance) { |
32 | 76 | $scope.aaa = "sss"; |
33 | 77 | $scope.add = function () { |
34 | 78 | $scope.aaa = "bbbbbb"; |
35 | 79 | } |
36 | 80 | } |
37 | 81 | }); |
| 82 | + pbox.result.then(function (result) { |
| 83 | + alert("close,result:" + result); |
| 84 | + }, function () { |
| 85 | + alert("dismiss"); |
| 86 | + }); |
38 | 87 | }; |
39 | | - $scope.close = function () { |
40 | | - pbox.close(); |
41 | | - } |
42 | 88 | }]); |
43 | 89 |
|
44 | 90 | </script> |
|
0 commit comments