angularjs - Custom Ionic Framework Popup -


i have ionic popup, see image below in link.

i have issue when click on buttons arrange coupon, redirect me next screen. fine.but popup doesn't hide. please me.

thanks.

http://awesomescreenshot.com/0e55lzsl39

var mypopup; $scope.showpopup = function() {  mypopup = $ionicpopup.show({      template: '<a class="button button-block button-energized" href="#/redeem">arrange coupon</a> <a class="button button-block button-balanced">add coupon</a> ',      title: 'coupon management',      buttons: [{         text: '<b>ok</b>',         type: 'button button-small button-positive',         ontap: function(e) {         }      }, ]   });  mypopup.then(function(res) {     if (res) {            console.log(res);     }     else{       alert('here');     }   }); 

};

looks forgot add image. however, ionic popup service allows programmatically creating, showing , closing popup. if have popup defined this,

var mypopup = $ionicpopup.show({ template: '<input type="password" ng-model="data.wifi">', title: 'enter wi-fi password', subtitle: 'please use normal things', scope: $scope, buttons: [   { text: 'cancel' },   {     text: '<b>save</b>',     type: 'button-positive',     ontap: function(e) {       if (!$scope.data.wifi) {         //don't allow user close unless enters wifi password         e.preventdefault();       } else {         return $scope.data.wifi;       }     }   } ] }); 

you can close this

mypopup.close(); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -