Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. var myPopup = $ionicPopup.show({
  2. template: '<input type="password" ng-model="data.wifi">',
  3. title: 'Enter Wi-Fi Password',
  4. subTitle: 'Please use normal things',
  5. scope: $scope,
  6. buttons: [
  7. { text: 'Cancel' },
  8. {
  9. text: '<b>Save</b>',
  10. type: 'button-positive',
  11. onTap: function(e) {
  12. if (!$scope.data.wifi) {
  13. //don't allow the user to close unless he enters wifi password
  14. e.preventDefault();
  15. } else {
  16. return $scope.data.wifi;
  17. }
  18. }
  19. }
  20. ]
  21. });
  22.  
  23. myPopup.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement