26
26
< div class = "modal" ng-controller = "ModalCtrl" >
27
27
< header class = "bar bar-header bar-assertive" >
28
28
< h1 class = "title" > New Contact</ h1 >
29
- < button class = "button button-clear button-primary" ng-click = "close()" > Cancel</ button >
30
29
</ header >
31
30
< ion-content has-header = "true" >
32
31
< div class = "padding" >
@@ -43,7 +42,8 @@ <h1 class="title">New Contact</h1>
43
42
< span class = "input-label" > Email</ span >
44
43
< input type = "text" placeholder = "" >
45
44
</ label >
46
- < button class = "button button-block button-positive" ng-click = "closeModal()" > Create</ button >
45
+ < button class = "button button-block button-positive" ng-click = "hideModal()" > Hide Modal</ button >
46
+ < button class = "button button-block button-positive" ng-click = "removeModal()" > Remove Modal</ button >
47
47
< button class = "button button-block button-positive" ng-click = "openActionSheet()" > ActionSheet</ button >
48
48
</ div >
49
49
</ div >
@@ -72,9 +72,6 @@ <h1 class="title">New Contact</h1>
72
72
$scope . openModal = function ( ) {
73
73
$scope . modal . show ( ) ;
74
74
} ;
75
- $scope . closeModal = function ( ) {
76
- $scope . modal . hide ( ) ;
77
- } ;
78
75
$ionicModal . fromTemplateUrl ( 'modal.html' , function ( modal ) {
79
76
$scope . modal = modal ;
80
77
} , {
@@ -85,9 +82,12 @@ <h1 class="title">New Contact</h1>
85
82
} )
86
83
87
84
. controller ( 'ModalCtrl' , function ( $scope , $ionicActionSheet ) {
88
- $scope . close = function ( ) {
85
+ $scope . hideModal = function ( ) {
89
86
$scope . modal . hide ( ) ;
90
- }
87
+ } ;
88
+ $scope . removeModal = function ( ) {
89
+ $scope . modal . remove ( ) ;
90
+ } ;
91
91
92
92
$scope . openActionSheet = function ( ) {
93
93
$ionicActionSheet . show ( {
0 commit comments